-
Notifications
You must be signed in to change notification settings - Fork 497
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
default__get_relations_by_pattern fails due to agate.row value selection by column name #484
Comments
Hi @TerjeRusska, thanks for opening the issue - I'm sorry to say I'm having trouble reproducing your experience with the sample you provided, can you share a more complete code sample? When I run The error that you pasted ( Thank you! |
If I try to run the line The compilation will return
No additional operations are added to the sql file The
Current code above in the marco will throw the Runtime Error because
I hope this makes it more clear 😅 If the DB returns column names that are not capitalized then no error is thrown. |
@TerjeRusska We have a hunch — any chance you have enabled the The query running in dbt-utils/macros/sql/get_tables_by_pattern_sql.sql Lines 8 to 10 in d279542
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
I also got the same issue and would love this to be resolved. I can contribute to the fix. |
Ran into this same issue today. I have an automated feed that creates new sources as they are ingested. I tried using this macro to get all the source tables but it fails to compile. I am also using QUOTED_IDENTIFIERS_IGNORE_CASE as case-sensitive identifiers is an evil that needs to be irradicated. |
I was getting this same error today, I was able to resolve it by changing the code of the get_relations_by_pattern macro to use UPPERCASE like so: |
Describe the bug
default__get_relations_by_pattern
is failing due to agate.row column selection by name being case sensitive. The relation creation process does not receive row values.Steps to reproduce
{{ dbt_utils.get_relations_by_pattern('%', '%', '', 'RAW') }}
Expected results
List of snowflake relations in the target sql file
Actual results
Screenshots and log output
In
default__get_relations_by_pattern
{% do log(table_list['table'], info=True) %}
agate.row value selection with
row.table_schema
will not give any results, however it does work itrow.TABLE_SCHEMA
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:Additional context
Are you interested in contributing the fix?
I can work on a fix that covers both lower and uppercase column names.
The text was updated successfully, but these errors were encountered: