Hi, Is batching not working in Snowflake. I am try...
# troubleshooting
s
Hi, Is batching not working in Snowflake. I am trying to batch snowflake records but it not working, I have marked the batch size as 150000 but I see the records getting written at 3k records only. My API will throw 3-100 records per call, I am not sure if this is the reason This is my config, I tried with just batch_size_rows but it didn't work.
Copy code
batch_size_rows: 150000
              batch_config:
                batch_size: 150000
                encoding:
                  format: jsonl
                  compression: gzip
                storage:
                  root: ""
1
@Edgar Ramírez (Arch.dev) - sorry to tag you, can you help me with this
e
Does your tap have parent-child streams?
s
I am running it in single stream it’s same result
e
What variant and version of target-snowflake is this?
s
Meltanolabs
I am pulling the latest from pip
0.0.24
e
Hmm that's not a valid version of the meltanolabs variant afaict: https://github.com/MeltanoLabs/target-snowflake/tags
s
I tried running parallel process with parent child child call being done on 300 parent keys in 20 processes , this is also same
I am using 0.7.1 I gave you tap version 🤦
e
Gotcha
what does
meltano.yml
look like?
s
this is how the target is configured
Copy code
- name: target-snowflake
            config:
              database: ${TARGET_SNOWFLAKE_DATABASE}
              account: ${TARGET_SNOWFLAKE_ACCOUNT}
              add_record_metadata: true
              clean_up_batch_files: ${TARGET_SNOWFLAKE_CLEAN_UP_BATCH_FILES}
              default_target_schema: ${TARGET_SNOWFLAKE_DEFAULT_TARGET_SCHEMA}
              flattening_enabled: ${TARGET_SNOWFLAKE_FLATTENING_ENABLED}
              flattening_max_depth: ${TARGET_SNOWFLAKE_FLATTENING_MAX_DEPTH}
              role: ${TARGET_SNOWFLAKE_ROLE}
              schema: ${TARGET_SNOWFLAKE_DEFAULT_TARGET_SCHEMA}
              user: ${TARGET_SNOWFLAKE_USER}
              warehouse: ${TARGET_SNOWFLAKE_WAREHOUSE}
              batch_size_rows: ${TARGET_SNOWFLAKE_BATCH_SIZE_ROWS}
              batch_config:
                batch_size: ${TARGET_SNOWFLAKE_BATCH_SIZE_ROWS}
                encoding:
                  format: jsonl
                  compression: gzip
                storage:
                  root: ".meltano/files/"
values being this
Copy code
batch_size_rows: 150000
              batch_config:
                batch_size: 150000
                encoding:
                  format: jsonl
                  compression: gzip
                storage:
                  root: ""
and I have same flattening in both Tap and target
I was wondering as target has flattening capability do we need to do it on tap
Copy code
flattening_enabled: true
flattening_max_depth: 10
This is how the target output looks
e
I think that's a red herring 🤔
s
How can we debug el command
is it possible
e
--log-level=debug
is a good start
s
I have enabled it , I am more of looking at setting breakpoints in runtime
to see why batch is ignored
e
Depends on your IDE I suppose
I'd create a sample JSONL file with the tap output
and debug the standalone target process with something like
cat singer.jsonl | target-snowflake ...
s
this jsonl will be singer messages right
e
correct
s
perfect I can work with it
I was wondering as target has flattening capability do we need to do it on tap
e
The target should support flattening
s
awesome for some reason I thought I needed to configure it on both ends 😄 , I will take it from here and check why it is no working for me, Thanks for your time have a great day
👀 1
e
Np!
s
Ok I tried debugging and it was working as designed, I went with the clean virtual environment and now I can see it drains at the batch size I defined, I think it's more of something messed up with my old environment
🙌 1