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
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
The following method raises an exception:
defquery_target_lag(project, dynamic_table: SnowflakeRelation) ->Optional[str]:
sql=f""" show dynamic tables like '{dynamic_table.identifier}' in schema {dynamic_table.schema} ; select "target_lag" from table(result_scan(last_query_id())) """returnproject.run_sql(sql, fetch="one")
The exception indicates that the API was expecting 1 statement but it received two.
Expected Behavior
The method above returns the target lag for the table.
Steps To Reproduce
This only happens in the test environment, the adapter itself can execute multi-line statements.
github-actionsbot
changed the title
[Bug] Test suite sql runner does not support multi-line statements
[ADAP-733] [Bug] Test suite sql runner does not support multi-line statements
Jul 27, 2023
This has a reasonable workaround. While the project fixture does not allow multi-line commands, it's possible to create a macro that performs the same task, which can then be called via adapter.execute_macro().
Is this a new bug in dbt-snowflake?
Current Behavior
The following method raises an exception:
The exception indicates that the API was expecting 1 statement but it received two.
Expected Behavior
The method above returns the target lag for the table.
Steps To Reproduce
This only happens in the test environment, the adapter itself can execute multi-line statements.
project.run_sql()
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: