Shantanu Panwar
11/09/2023, 8:45 AM001795 (42601): SQL compilation error: error line 2 at position 25
08:16:01 maximum number of expressions in a list exceeded, expected at most 16,384, got 24,002
Snowflake has a limitation of at most 16,384 expressions at a time.
For reference: https://community.snowflake.com/s/article/maxi-expressions-exceeded
But the insert statement into dbt_columns doesnโt handle it pretty well. Can you please fix it or let me know if I am missing something?
cc: @Or Avidov @Maayan SalomShantanu Panwar
11/09/2023, 8:51 AMElementary: Inserting 24002 rows to table "ETHOS_PRODUCTION"."DBT_CORE_TRANSFORMATION_ELEMENTARY"."DBT_COLUMNS__tmp_20231109081533313323"
2023-11-09 08:15:55.918723 (MainThread): 08:15:55 Elementary: [1/1] Running insert query.
2023-11-09 08:16:00.480962 (MainThread): 08:16:00 Using snowflake connection "master"
2023-11-09 08:16:00.516622 (MainThread): 08:16:00 On master: insert into "ETHOS_PRODUCTION"."DBT_CORE_TRANSFORMATION_ELEMENTARY"."DBT_COLUMNS__tmp_20231109081533313323"
(METADATA_HASH) values
('xxxxxx509'),('xxxxxc13'),('xxxx38d')... 24002 records.
Let me know if you want complete debug logs.Idan Shavit
11/09/2023, 9:12 AMShantanu Panwar
11/09/2023, 9:32 AMB
01/24/2024, 3:19 AMShantanu Panwar
01/24/2024, 5:50 AMB
01/24/2024, 5:51 AMShantanu Panwar
01/24/2024, 5:51 AMB
01/24/2024, 5:52 AMShantanu Panwar
01/24/2024, 5:53 AMB
01/24/2024, 6:50 AMOfek Weiss
02/04/2024, 2:37 PMdbt_project.yml to resolve this issue:
vars:
insert_rows_method: chunk
dbt_artifacts_chunk_size: 5000
you can play around with dbt_artifacts_chunk_size to see what works best for you, but 5000 should be a great startB
02/05/2024, 10:55 AMOfek Weiss
02/05/2024, 11:07 AM5000 record each, so if, for example, there are 25,000 records to be uploaded, instead of attempting to insert all of them in a single insert command, it will run 5 separate insert commands of 5,000 recordsB
02/05/2024, 11:08 AMOfek Weiss
02/05/2024, 12:36 PM