matt_cooley
10/11/2021, 8:35 PMbatch_size_rows
in the pipelinewise target-redshift
using an env variable.
- batch_size_rows: ${BATCH_SIZE_ROWS}
# export BATCH_SIZE_ROWS=30000
I keep getting this error: ValueError: invalid literal for int() with base 10:
Oddly enough, when I do this with the transferwise target-postgres
it works just fine. Any ideas?edgar_ramirez_mondragon
10/11/2021, 8:54 PMmeltano config target-redshift list
do you see the right value? It should also tell you where the value is coming from. In this case I assume you have something like
- name: target-redshift
config:
batch_size_rows: ${BATCH_SIZE_ROWS}
in meltano.yml
, so that's the source that should showmatt_cooley
10/11/2021, 8:55 PMedgar_ramirez_mondragon
10/11/2021, 9:33 PMmeltano.yml
config look like for target-redshift? With yaml, bad indentation can cause bugsmatt_cooley
10/11/2021, 10:37 PMbatch_size_rows: 300000
but if I change it to the env var:
batch_size_rows: ${BATCH_SIZE_ROWS}
it fails. Sorry, by original had an extra -
Also, if I do
batch_size_rows: ${BATCH_SIZE_ROWS}
in the target-postgres
it works just fine. So I’m thinking it might be something in the target, but I’m not sure how meltano abstracts away the configvisch
10/13/2021, 12:33 PMexport <PLUGIN_NAME>_<SETTING_NAME>=<value>
So something like
export TARGET_REDSHIFT_BATCH_SIZE_ROWS=300000
should do it!
The "trick" with Meltano is that you have to include the setting
with the tap/target for the setting to be detected in .env
files, since you're just using environment variables this should just work! Better yet, target-redshift it's one of the included taps/targets in Meltanos discovery which means there's nothing special you need to do, it should just work.
I debug this with the command @edgar_ramirez_mondragon gave here https://meltano.slack.com/archives/C01TCRBBJD7/p1633985690450700?thread_ts=1633984552.450600&cid=C01TCRBBJD7matt_cooley
10/14/2021, 4:02 PM