You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a table contains dates/timestamps with a wide gap from the present day then min/max validations throw an exception:
raise ValueError("Trying to coerce float values to integers")
ValueError: Trying to coerce float values to integers
Test tables
Oracle:
CREATE TABLE dvt_test.dvt_tricky_dates (
id NUMBER(5) NOT NULL PRIMARY KEY
, col_dt_low DATE
, col_dt_epoch DATE
, col_dt_high DATE
, col_ts_low TIMESTAMP(0)
, col_ts_epoch TIMESTAMP(0)
, col_ts_high TIMESTAMP(0));
INSERT INTO dvt_test.dvt_tricky_dates VALUES
(1,DATE'1000-01-01',DATE'1970-01-01',DATE'9999-12-31'
,TIMESTAMP'1000-01-01 00:00:00',TIMESTAMP'1970-01-01 00:00:00',TIMESTAMP'9999-12-31 23:59:59');
COMMIT;
PostgreSQL:
CREATE TABLE dvt_test.dvt_tricky_dates (
id integer NOT NULL PRIMARY KEY
, col_dt_low date
, col_dt_epoch date
, col_dt_high date
, col_ts_low timestamp(0)
, col_ts_epoch timestamp(0)
, col_ts_high timestamp(0));
INSERT INTO dvt_test.dvt_tricky_dates VALUES
(1,DATE'1000-01-01',DATE'1970-01-01',DATE'9999-12-31'
,TIMESTAMP'1000-01-01 00:00:00',TIMESTAMP'1970-01-01 00:00:00',TIMESTAMP'9999-12-31 23:59:59');
Test commands
col_dt_low:
data-validation -v validate column -sc ora_local -tc pg_local --tables-list=dvt_test.dvt_tricky_dates \
--min="col_dt_low" --max="col_dt_low"
Traceback (most recent call last):
File "/professional-services-data-validator/.venv/bin/data-validation", line 8, in <module>
sys.exit(main())
^^^^^^
File "/professional-services-data-validator/data_validation/__main__.py", line 694, in main
validate(args)
File "/professional-services-data-validator/data_validation/__main__.py", line 670, in validate
run(args)
File "/professional-services-data-validator/data_validation/__main__.py", line 636, in run
run_validations(args, config_managers)
File "/professional-services-data-validator/data_validation/__main__.py", line 575, in run_validations
run_validation(config_manager, dry_run=args.dry_run, verbose=args.verbose)
File "/professional-services-data-validator/data_validation/__main__.py", line 564, in run_validation
validator.execute()
File "/professional-services-data-validator/data_validation/data_validation.py", line 118, in execute
result_df = self._execute_validation(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/professional-services-data-validator/data_validation/data_validation.py", line 379, in _execute_validation
raise e
File "/professional-services-data-validator/data_validation/data_validation.py", line 360, in _execute_validation
result_df = util.timed_call(
^^^^^^^^^^^^^^^^
File "/professional-services-data-validator/data_validation/util.py", line 21, in timed_call
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/professional-services-data-validator/data_validation/combiner.py", line 77, in generate_report
differences_df = client.execute(differences_pivot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
subarr = maybe_cast_to_integer_array(arr, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/professional-services-data-validator/.venv/lib/python3.11/site-packages/pandas/core/dtypes/cast.py", line 1688, in maybe_cast_to_integer_array
raise ValueError("Trying to coerce float values to integers")
ValueError: Trying to coerce float values to integers
If a table contains dates/timestamps with a wide gap from the present day then min/max validations throw an exception:
Test tables
Oracle:
PostgreSQL:
Test commands
col_dt_low:
col_dt_epoch (near present time):
col_dt_high:
col_ts_low:
col_ts_epoch:
col_ts_high:
The text was updated successfully, but these errors were encountered: