Is this a new bug in dbt-core?
Current Behavior
We use --empty to create empty tables. If there is no record in the table, dbt_utils.get_column_values() fails with a NoneType' object is not iterable error as it does not found values to loop through.
similar issue found with
- dbt_utils.pivot()
- dbt_utils.get_query_results_as_dict()
Expected Behavior
Function to create some dummy records to make it pass.
- dbt_utils.get_column_values()
- dbt_utils.pivot()
- dbt_utils.get_query_results_as_dict()
Steps To Reproduce
Use dbt_utils macros for empty tables
dbt_utils.get_query_results_as_dict(SELECT * FROM empty_table)
Relevant log output
Environment
dbt version: 1.9.2
python version: 3.11.1
adapter type: snowflake
adapter version: 1.9.1
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
Is this a new bug in dbt-core?
Current Behavior
We use --empty to create empty tables. If there is no record in the table, dbt_utils.get_column_values() fails with a NoneType' object is not iterable error as it does not found values to loop through.
similar issue found with
Expected Behavior
Function to create some dummy records to make it pass.
Steps To Reproduce
Use dbt_utils macros for empty tables
dbt_utils.get_query_results_as_dict(SELECT * FROM empty_table)
Relevant log output
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response