jozef_reginac
10/13/2021, 9:10 AMbatch_size parameter with default value of 100k (within meltano it’s 5k), but when we run it with 150k we get CRITICAL error:
target-snowflake-test | CRITICAL maximum number of expressions in a list exceeded, expected at most 16,384, got 27,501
This seems to be a limit of snowflake. Are we missing some setting in our target or how do you overcome this limit in your projects?dave_lyons
10/13/2021, 3:36 PMtransferwise variant. The default is the datamill-co variant but I found that one had a bug involving unconstrained large integers so I switched to the Meltano variant. I haven't changed the batch_size yet but was planning to.dave_lyons
10/13/2021, 7:40 PMtarget-snowflake variant if I set batch_size to 150K, currently running at 15K. This seems to be because the loader is using an INSERT or a MERGE ... SELECT ... WHERE ... IN(a list with length of batch_size)?jozef_reginac
10/14/2021, 7:41 AMdave_lyons
10/14/2021, 11:08 AMtarget-snowflake uses the snowflake-connector-python package to do UPSERTs, which in turn uses a list and Snowflake has a hard limit of 16384. I don't see anything in the loader that checks if the UPSERT list is greater than 16384 and chunks it - meaning it just sends a list longer than the limit to Snowflake and Snowflake rejects it.jozef_reginac
10/18/2021, 12:05 PMtarget-snowflake but no issue is there. Do you know if this is not usual workflow and they use something else to load data?aaronsteers
10/18/2021, 11:12 PMaaronsteers
10/18/2021, 11:35 PMjozef_reginac
10/19/2021, 6:55 AMdave_lyons
10/19/2021, 1:18 PMtarget-snowflake?julian_knight
10/19/2021, 2:08 PMmeltano variant. I have a hunch the 16K limit doesn’t apply when loading from a file using stages? Both the datamill and transferwise variants do this (and the one I’m working on will too)dave_lyons
10/19/2021, 2:28 PMjulian_knight
10/19/2021, 5:05 PMdave_lyons
10/19/2021, 5:16 PMdave_lyons
10/19/2021, 6:04 PMtransferwise variant batches at 100K but for some reason its not doing the last batch of each table, which invariably is less than 100K. i.e. a table has 1,195,000 rows, the target ends up with 1,100,000. I am using FULL_TABLE from my Postgres source and I don’t seen anything in the logs that looks like an error…
[UPDATE} It looks like the pipeline went through all four tables I had selected, then went back and did the last batch for each one?