New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Support for BigNumeric BQ data type #161
Comments
It looks like the BigQuery client had no issues. Ibis broke since the type is not in the list of BQ -> Ibis type lookups A hacky fix is to add
This is not a proper solution, alternatively we can use text if that is the ideal final solution in Ibis. If we use numeric, then Ibis treats the value as such and can apply sum, mean, ... normally |
We are working to temporarily fix the issue using However, since numeric type is pulled from the source types we are likely to still hit issues during execution |
When we try to use first approach mentioned [here](#161 (comment)) Following error is thrown: Full stack trace: |
We had some discussion here googleapis/python-bigquery#367 pyarrow is about 2x as fast for concatenating multiple pages of results compared to concatenating data frames directly. I wonder if there's a Python object dtype for arrow that we can use in the meantime while we wait for the properly sized numeric columns to be available? |
Try setting |
Leaving this ticket as a reminder to
This is non blocking, moving off Beta and to p2 |
BigNumeric is now supported as of 1.1.7, closing |
Currently the tool doesn't support a BigNumeric data type(still not GA yet). However, the customers are using this data type as its enabled through alpha process for them.
Hence, we need this tool to support that data type.
Currently I get following exception:
Traceback (most recent call last):
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/bin/data-validation", line 8, in
sys.exit(main())
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/main.py", line 248, in main
run(args)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/main.py", line 227, in run
run_validations(args, config_managers)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/main.py", line 203, in run_validations
run_validation(config_manager, verbose=args.verbose)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/main.py", line 192, in run_validation
validator.execute()
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/data_validation.py", line 85, in execute
self.validation_builder, process_in_memory=True
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/data_validation.py", line 160, in _execute_validation
source_query = validation_builder.get_source_query()
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/validation_builder.py", line 211, in get_source_query
query = self.source_builder.compile(**source_config)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/query_builder/query_builder.py", line 238, in compile
table = clients.get_ibis_table(data_client, schema_name, table_name)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/data_validation/clients.py", line 86, in get_ibis_table
return client.table(table_name, database=schema_name)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/bigquery/client.py", line 406, in table
t = super().table(name, database=database)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/client.py", line 115, in table
schema = self._get_table_schema(qualified_name)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/bigquery/client.py", line 430, in _get_table_schema
return self.get_schema(table, database=dataset)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/bigquery/client.py", line 526, in get_schema
return sch.infer(bq_table)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/multipledispatch/dispatcher.py", line 278, in call
return func(*args, **kwargs)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/bigquery/client.py", line 80, in bigquery_schema
return sch.schema(fields)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/multipledispatch/dispatcher.py", line 278, in call
return func(*args, **kwargs)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/expr/schema.py", line 174, in schema_from_mapping
return Schema.from_dict(d)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/expr/schema.py", line 101, in from_dict
return Schema(*zip(*dictionary.items()))
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/expr/schema.py", line 31, in init
self.types = list(map(dt.dtype, types))
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/multipledispatch/dispatcher.py", line 278, in call
return func(*args, **kwargs)
File "/Users/dhavaldurve/pso-td2bq/apps/data_validation_wrapper/venv/lib/python3.7/site-packages/ibis/expr/datatypes.py", line 1543, in from_string
'{!r} cannot be parsed as a datatype'.format(value)
ibis.common.exceptions.IbisTypeError: 'BIGNUMERIC' cannot be parsed as a datatype
The text was updated successfully, but these errors were encountered: