Justen Walker
01/04/2023, 4:49 PMJusten Walker
01/04/2023, 4:52 PMBEGIN;
INSERT INTO MYSCHEMA._airbyte_raw_report_test_a SELECT * FROM MYSCHEMA._airbyte_tmp_ccz_report_test_a;
INSERT INTO MYSCHEMA._airbyte_raw_report_test_b SELECT * FROM MYSCHEMA._airbyte_tmp_cxz_report_test_b;
INSERT INTO MYSCHEMA._airbyte_raw_report_test_c SELECT * FROM MYSCHEMA._airbyte_tmp_tjd_report_test_c;
INSERT INTO MYSCHEMA._airbyte_raw_report_test_d SELECT * FROM MYSCHEMA._airbyte_tmp_upi_report_test_d;
COMMIT;Justen Walker
01/04/2023, 5:50 PMRyan Fu (Airbyte)
01/04/2023, 9:43 PMINSERT INTO from temp_table)
This is currently being worked on as part of destination checkpointing but the main premise is that currently the data gets written to temporary tables to then be copied all at once to the finalized raw table. What will happen with the checkpointing changes is that throughout the flushing of the buffer (where records are stored in memory/files), it will commit that data directly into the finalized raw table
This gives us a few benefits, but in your case, it will reduce singular long-running transactions in favor of the smaller frequent transactions. Hope that helps but if not Snowflake does provide a way to see which queries are holding a lock on a table. This should give your more insights into what is causing the locking and hopefully other users can share their knowledge on optimizing SnowflakeNataly Merezhuk (Airbyte)
01/09/2023, 4:40 PMJusten Walker
01/09/2023, 7:01 PMNataly Merezhuk (Airbyte)
01/09/2023, 7:26 PMuser
01/09/2023, 7:26 PMJusten Walker
01/09/2023, 11:47 PMSHOW LOCKS IN ACCOUNT; returns anything when this happens. If it does; aside from aborting them, should I report the queries here?Nataly Merezhuk (Airbyte)
01/10/2023, 2:14 PM