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
Tagging this one with the BigQuery label because that's where I've seen it, but it could conceivably happen on any plugin.
If a database or schema name is numeric, then Agate's type inference will make the database_name or schema_name column (unique to a given agate table) numeric during catalog generation. This causes some calls to database_name.lower() or schema_name.lower() to fail with an error:
encountered an error while generating catalog: 'decimal.Decimal' object has no attribute 'lower'
I think I narrowed this down to _relations_filter_schemas in the base impl.py, but it's possible that there are other places where we assume the database name is going to be a string.
Beyond this first issue, Agate will also be mad about unioning together different agate tables that were fetched in parallel if one of those columns is string-y and the other is number-y in nature.
dbt should ensure that all of the known-string columns are returned as strings (and not numbers, if they look numeric) when fetching information from the system catalog.
drewbanin
changed the title
[Barbara Gittings] Docs generation fails if a database name is numeric-looking
[Barbara Gittings] Docs generation fails if a database/schema name is numeric-looking
Mar 17, 2020
Describe the bug
Tagging this one with the BigQuery label because that's where I've seen it, but it could conceivably happen on any plugin.
If a database or schema name is numeric, then Agate's type inference will make the
database_name
orschema_name
column (unique to a given agate table) numeric during catalog generation. This causes some calls todatabase_name.lower()
orschema_name.lower()
to fail with an error:I think I narrowed this down to
_relations_filter_schemas
in the baseimpl.py
, but it's possible that there are other places where we assume the database name is going to be a string.Beyond this first issue, Agate will also be mad about unioning together different agate tables that were fetched in parallel if one of those columns is string-y and the other is number-y in nature.
dbt should ensure that all of the known-string columns are returned as strings (and not numbers, if they look numeric) when fetching information from the system catalog.
Steps To Reproduce
Use the profile:
Then run:
System information
Which database are you using dbt with?
The output of
dbt --version
:The text was updated successfully, but these errors were encountered: