-
Notifications
You must be signed in to change notification settings - Fork 326
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
Implement transactional Table Upload / Update / Delete Rows for Snowflake backend #10609
Comments
Assigning high priority as without it Snowflake If we want to ship proper Snowflake support before this is implemented, we should probably disable |
- Closes #9486 - All tests are succeeding or marked pending - Created follow up tickets for things that still need to be addressed, including: - Fixing upload / table update #10609 - Fixing `Count_Distinct` on Boolean columns #10611 - Running the tests on CI is not part of this PR - to be addressed separately
Radosław Waśko reports a new STANDUP for yesterday (2024-07-29): Progress: Investigating the IDE problems on my machine. Created PR #10708 that fixes propagation of some FS errors that used to be swallowed by accident. Found out the root cause - I had Controlled Folder Access feature of Windows Defender enabled and it was preventing writes to Documents folder. Started libs/engine discussion on what we can do about it. Started work on Snowflake transactional upload - refactored current upload logic to make it easier to work with. It should be finished by 2024-08-07. Next Day: Next day I will be working on the same task. Continue - analyze the 'shape' of each transaction and see what kind of abstraction could work to make it work for Snowflake's constraints. |
Radosław Waśko reports a new STANDUP for yesterday (2024-07-30): Progress: Designing how to approach the Snowflake transaction constraints. It should be finished by 2024-08-07. Next Day: Next day I will be working on the same task. Continue - implement the 'transaction with tables' and DDL check. |
…r submodules (#10713) - First step of #10609 - before I actually modify it, I decided I need to refactor the `Upload_Table` logic as it was quite convoluted. Doing this as a separate PR for easier review. A big 600+ line file was replaced by several smaller ones grouped by topics. - Practically no changes apart from moving stuff into separate modules. - One small change - added `Missing_Argument` to `SQL_Query` as I noticed that lack of defaults was giving rise to confusing errors when working with `query` in the GUI. Before:  After:  
Radosław Waśko reports a new STANDUP for yesterday (2024-07-31): Progress: Implemented the 'transaction with tables'. Added a check for DDL in transactions that prevents undesirable behaviour (accidental commit). Lost quite some time on #7117 bug when testing it. It should be finished by 2024-08-07. Next Day: Next day I will be working on the same task. Integrate 'transaction with tables' with current operations. |
Radosław Waśko reports a new STANDUP for yesterday (2024-08-01): Progress: Integrated Create and Select_Into, basic tests passing. It should be finished by 2024-08-07. Next Day: Next day I will be working on the same task. Continue - Update and Delete. |
Radosław Waśko reports a new STANDUP for the provided date (2024-08-02): Progress: Prepared the Snowflake transactions PR for review - finished remaining operations and fixed tests. It should be finished by 2024-08-07. Next Day: Next day I will be working on the #10716 task. Next task - investigate suggestions issue |
Snowflake is a first Database we support that has
dataDefinitionCausesTransactionCommit()
returntrue
, meaning that we cannot make a DDL statement be a part of a bigger transaction.Our Upload / Update rows mechanisms were relying on using DDL statements in transactions and on transaction roll-back also deleting such tables created within a transaction. In Snowflake that does not work.
We need to implement another strategy for creating / updating tables that can work in such environment.
It probably needs to split the action into 3 phases:
This is still less robust than combining the whole operation in a single transaction - but we've got to deal with what we can use. However, because of that - we do not want the new strategy to replace the 'old' fully transactional one. Instead, we want to abstract away the common parts (creating something like
DDL_Transaction_Strategy
) and provide to theUpload_Table
code two possible strategies. If the transactional one is available for a given database it should be preferred, falling back to the one described above. Ideally the main table update logic should be the same and only delegate to the DDL strategy.The text was updated successfully, but these errors were encountered: