-
Notifications
You must be signed in to change notification settings - Fork 179
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-885] [Bug] Dynamic table alter syntax and comment syntax is wrong #769
[ADAP-885] [Bug] Dynamic table alter syntax and comment syntax is wrong #769
Comments
Nevermind, I found what you're talking about. You already have a PR open for the first fix, would you be willing to finish this off by updating the second macro as well? |
@mikealfare |
Is that the correct syntax for a dynamic table? https://docs.snowflake.com/en/sql-reference/sql/alter-table-column It looks like SHOW DYNAMIC TABLES LIKE 'x';
> [1 line]
alter dynamic table dev.test_schema.x alter "column_1" COMMENT $$test comment$$;
> Syntax error: unexpected 'alter'. (line 1)
alter table dev.test_schema.x alter "column_1" COMMENT $$test comment$$;
> Statement executed successfully. |
Nice catch @Gyllsdorff. I'm surprised that's the syntax, but it looks like you're correct. If you want to submit a PR I can review it. Otherwise I'll take a look next week. |
Alright, thanks for pointing that @Gyllsdorff . |
@mikealfare I might have done the fork / PR wrong, but the above change should do it. |
Hi @kaarthik108 In Snowflake the syntax that works for dynamic table is as shown below: alter table dim_airport alter airport_code comment 'Airport code (IATA 3 letter code)', You don't need the word "dynamic" in the alter statement. Can you confirm if your fix covers the above? |
Thanks, when would #790 be made available?
…On Mon, Oct 2, 2023 at 2:43 PM Kaarthik Andavar ***@***.***> wrote:
Hi @dearhari <https://github.com/dearhari> , yes that's the fix I have
corrected in the latest PR.
for the alter table comment.
It doesn't work on 1.6.4, currently it is alter dynamic table table_name
alter
This is now fixed on #790
<#790>
—
Reply to this email directly, view it on GitHub
<#769 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUKVD2YZRLOGI57YQ46MNKLX5IL4TANCNFSM6AAAAAA4XFVBZE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Regards,
*Hari Velayuthan*
|
Is this a new bug in dbt-snowflake?
Current Behavior
DBT tries to comment on the model with a wrong syntax statement
comment on dynamic_table model_name AS
Instead of
comment on dynamic table model_name AS
Also, during the alter process
it tries to do
alter dynamic_table sandbox.procs.customer alter
instead of
alter dynamic table sandbox.procs.customer alter
Expected Behavior
comment on dynamic table model_name AS
and
alter dynamic table sandbox.procs.customer alter
Steps To Reproduce
To be able to change the 'dynamic_table' keyword to 'dynamic table'
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: