meltano: bug: meltano run with any tap and `target-snowflake` fails at the end of the run, even though it works when piped with `meltano invoke`
Meltano Version
2.19.0
Python Version
3.10
Bug scope
CLI (options, error messages, logging, etc.)
Operating System
MacOS 13.4 (22F66) Ventura
Description
I have added target-snowflake
(transferwise variant) and configured it correctly.
It works when invoked alone using meltano invoke target-snowflake
.
Invoking a tap and piping into the target also works: meltano invoke tap-slack | meltano invoke target-snowflake
However, using meltano run
results in a crash: meltano run tap-slack target-snowflake
There is no useful information given by the logs.
I tried using tap-csv
- it doesn’t work either.
Code
Here is the config:
version: 1
default_environment: dev
project_id: c35e4650-7eda-4f6e-aae8-f331ae5615a3
environments:
- name: dev
- name: staging
- name: prod
plugins:
extractors:
- name: tap-slack
variant: meltanolabs
pip_url: git+https://github.com/MeltanoLabs/tap-slack.git
config:
channel_types:
- public_channel
- private_channel
selected_channels:
- <redacted>
start_date: '2023-01-01'
thread_lookback_days: 10
include_admin_streams: true
load_schema: meltano_slack
select:
- users.id
- name: tap-csv
variant: meltanolabs
pip_url: git+https://github.com/MeltanoLabs/tap-csv.git
load_schema: meltano_csv
config:
add_metadata_columns: true
files: '[{"entity": "meubles", "path": "SampleCSVFile_10600kb.csv","keys":["name"]}]'
loaders:
- name: target-snowflake
variant: transferwise
pip_url: pipelinewise-target-snowflake
config:
account: <redacted>
dbname: <redacted>
user: meltano_user
warehouse: COMPUTE_WH
file_format: func.my_parquet_format
role: meltano_role
s3_bucket: backend-snapshot-copy
s3_key_prefix: snowflake-imports/
stage: backend.my_s3_stage
default_target_schema: meltano
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (4 by maintainers)
Awesome, thanks for making the link between this error and
pyarrow
! That was indeed the problem 🕵️The fix
I first listed all dependencies from
target-snowflake
using.meltano/loaders/target-snowflake/venv/bin/python -m pip freeze
.Output
We can see
pyarrow==8.0.0
💡In parallel, I also found https://github.com/Homebrew/homebrew-core/issues/125329 which suggests that PyArrow > 9 fixes the issue. I installed the latest (
pyarrow==12.0.*
), and this fixed the problem 🎉Now I have a warning from
target-snowflake
that the version is incompatible, but since it works, I’m fine with having a warning 🙃UserWarning: You have an incompatible version of 'pyarrow' installed (12.0.1), please install a version that adheres to: 'pyarrow<8.1.0,>=8.0.0; extra == "pandas"
But at least, nothing crashes anymore 🎉 🎉
What’s next?
There’s still at least ~1/2 months left before I can try convincing people from switchting to Meltano. I’ll see whether we use the Wise or the Meltano variant at this time.
Thanks for the support again 🙏