-
Notifications
You must be signed in to change notification settings - Fork 59
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
[ADAP-671] Statements executed one by one instead of as a whole block #521
Comments
We noticed the same with our post-hook, what helped us to set |
@naumovdalex sorry to hear your existing workflows is failing. As part of the migration to using the Check out #463 for more context, and I'd love to see if you get the the intended behavior by doing as @jan-benisek says and adding I suspect that you may still encounter issues due to design decisions of the underlying connector library, for example see aws/amazon-redshift-python-driver#162. |
@naumovdalex I'm going to close this issue for now. If possible, I think this would make a great reproducible use case to rationalize aws/amazon-redshift-python-driver#162. Perhaps open an issue there detailing the limitation? |
I tried this, unfortunately that didn't help as well. Also, as part of our team uses dbt Cloud IDE as well, this would be a bit more complicated for us |
@dataders it's not that the workflows fail, but some macros are taking more than 5 minutes to execute, instead of just a few seconds |
I understand now -- that not an ideal experience. @naumovdalex can you please provide a reproducible example? This would help the engineer at Redshift work on the above linked issue on their connector library |
@naumovdalex are you still experiencing this issue in the new versions of dbt-redshift? |
Is this a regression in a recent version of dbt-redshift?
Current Behavior
We have a macro in dbt that runs a set of DDL statements on Redshift. We concatenate those statements in a string (
cmd
) and run with"{% do run_query(cmd) %}"
. That string looks like below;begin; ddl_statement_1; ddl_statement_2; ddl_statement_3; ... ... ddl_statement_x; end;
After moving to dbt 1.5, we see that those statements are executed one by one, instead of sending the statement as a whole to database. We can see it both in database logs and dbt logs.
Impact
In 1.5 and onwards, these statements take more than 5 minutes to execute. Previously in versions 1.4 and below, they would execute in only a few seconds.
Expected/Previous Behavior
The below statements are executed at once in a single transaction.
begin; ddl_statement_1; ddl_statement_2; ddl_statement_3; ... ... ddl_statement_x; end;
Steps To Reproduce
"{% do run_query(cmd) %}"
Relevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: