dbt seed not working in 0.17.0-b1

Created on 6 May 2020  路  5Comments  路  Source: fishtown-analytics/dbt

Describe the bug

dbt seed fails to load seed files

Steps To Reproduce

dbt seed --full-refresh

Expected behavior

with 0.16 --full-refresh was not required, now it seems to be but is not working (yet?)

Screenshots and log output

Completed with 7 errors and 0 warnings:

Database Error in seed data_geo_mapping_at (data\data_geo_mapping_at.csv)
  002002 (42710): SQL compilation error:
  Object 'C2061500.SCHEMA."data_geo_mapping_at"' already exists.

System information

Which database are you using dbt with?

  • [ ] postgres
  • [ ] redshift
  • [ ] bigquery
  • [X] snowflake
  • [ ] other (specify: ____________)

The output of dbt --version:

installed version: 0.17.0-b1
   latest version: 0.16.1

Your version of dbt is ahead of the latest release!

Plugins: [empty, but dbt-utils and snowflake-spend are installed]

The operating system you're using:
Windows 10 64bit

The output of python --version:
Python 3.8.2

Additional context

Add any other context about the problem here.

bug

Most helpful comment

This has something to do with quoting/casing - it works fine without. Probably caused by this PR: https://github.com/fishtown-analytics/dbt/pull/2322

All 5 comments

This has something to do with quoting/casing - it works fine without. Probably caused by this PR: https://github.com/fishtown-analytics/dbt/pull/2322

@swiffer I can't seem to reproduce this locally, please let me know if I'm missing a step:

  • create a seed file (data/seedtable.csv)
  • in dbt_project.yml, set identifier: true in the top-level quoting block
  • dbt seed -> table named "seedtable" created, quoted and lowercased
  • dbt seed again -> works
  • dbt seed --full-refresh -> works
  • add a column in the seed, dbt seed again -> fails
  • dbt seed --full-refresh -> works
  • remove a column in the seed, dbt seed works (but with an all-null column, of course).

What am I missing?

Actually, this is a very interesting snippet now that I look more carefully:

Plugins: [empty, but dbt-utils and snowflake-spend are installed]

This list shouldn't be empty! It should say at least - snowflake: 0.17.0a1 (which is wrong due to #2408). Can you try pip install --upgrade dbt-snowflake==0.17.0b1?

Thanks looking into it and responding so quickly!

I've installed dbt-core and dbt-snowflake via pipenv:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
dbt-core = "==0.17.0b1"
dbt-snowflake = "==0.17.0b1"

[requires]
python_version = "3.8"

dbt --version shows no plugins installed.

dbt run is working fine.

dbt seed works fine when the tables do not exist.
dbt seed fails when the table exists: Object 'C2061500.ANALYTICS."data_population_de"' already exists.

dbt_project.yml

quoting:
  identifier: true
  schema: true

I've opened a new bug for the "version not showing up at all" behavior (#2410) - sorry about that, the bug only appears when installed in non-editable mode so I was very confused for a while!

For the issue at hand here, thanks! The schema: true flag does the trick here (even when quoting isn't necessary!) - I'll dig into this, thanks for your help!

Was this page helpful?
0 / 5 - 0 ratings