I created (and granted privs to) Snowflake FILE FO...
# troubleshooting
j
I created (and granted privs to) Snowflake FILE FORMAT required by target-snowflake. When I execute meltano run, it fails:
Copy code
target_snowflake.exceptions.FileFormatNotFoundException: Named file format not found: MELTANO_FORMAT
Anyone knows how exactly create FILE FORMAT in Snowflake so Meltano finds it? I executed USE WAREHOUSE and then tried: • CREATE FILE FORMAT dbName.schemaName.formatName and in meltano.yml set file_format=schemaName.formatName • CREATE FILE FORMAT formatName and in meltano.yml set file_format=formatName
OK, it looks like the system of privileges in Snowflake strikes back (I really hate it)
Missing
GRANT
ALL
PRIVILEGES
ON
ALL
SCHEMAS
IN
DATABASE
while creating format in different schema than where loading data.
Now it works!
g
Which file_format configuration did you used? I used both that you mentioned and none is working
j
This works for me:
Copy code
CREATE FILE FORMAT internal_bi_dev.PUBLIC.meltano_format TYPE = 'CSV' ESCAPE='\\' FIELD_OPTIONALLY_ENCLOSED_BY='"';
GRANT ALL PRIVILEGES ON FILE FORMAT internal_bi_dev.PUBLIC.meltano_format TO internal_bi_dev_role;
And meltano.yml contains:
Copy code
- name: target-snowflake
    variant: transferwise
    pip_url: pipelinewise-target-snowflake
    config:
      .....
      file_format: PUBLIC.MELTANO_FORMAT
g
Thanks for sharing the scripts, it’s working here now too! 👍
s
👋 Just seeing this thread now. I'm using pipelinewise but even if I put in a nonsense file_format, I don't get the error:
Copy code
target_snowflake.exceptions.FileFormatNotFoundException: Named file format not found: MELTANO_FORMAT
My meltano.yml looks like:
Copy code
...
  loaders:
  - name: target-snowflake
    variant: transferwise
    pip_url: pipelinewise-target-snowflake
    config:
      account: $SNOWFLAKE_ACCOUNT
      database: $SNOWFLAKE_DATABASE
      user: $SNOWFLAKE_USER
      password: $SNOWFLAKE_PASSWORD
      warehouse: $SNOWFLAKE_WAREHOUSE
      role: $SNOWFLAKE_ROLE
      default_target_schema: $SNOWFLAKE_SCHEMA
      file_format: nonsense
and I can still run the command
meltano el tap-postgres target-snowflake
Did either of you run into this problem?
j
AFAIK meanwhile they improved the target-snowflake so it can handle the format automatically. I didn't have time to adopt it yet, thanks for reminding me! 🙂