Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt seed not working in 0.17.0-b1 #2403

Closed
1 of 5 tasks
swiffer opened this issue May 6, 2020 · 5 comments · Fixed by #2411
Closed
1 of 5 tasks

dbt seed not working in 0.17.0-b1 #2403

swiffer opened this issue May 6, 2020 · 5 comments · Fixed by #2411
Labels
bug Something isn't working

Comments

@swiffer
Copy link

swiffer commented May 6, 2020

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
  • 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.

@swiffer swiffer added bug Something isn't working triage labels May 6, 2020
@drewbanin drewbanin removed the triage label May 6, 2020
@drewbanin drewbanin added this to the Octavius Catto milestone May 6, 2020
@beckjake
Copy link
Contributor

beckjake commented May 6, 2020

This has something to do with quoting/casing - it works fine without. Probably caused by this PR: #2322

@beckjake
Copy link
Contributor

beckjake commented May 6, 2020

@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?

@beckjake
Copy link
Contributor

beckjake commented May 6, 2020

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?

@swiffer
Copy link
Author

swiffer commented May 6, 2020

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

@beckjake
Copy link
Contributor

beckjake commented May 6, 2020

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!

beckjake added a commit that referenced this issue May 8, 2020
…case

Preserve the case of schemas and databases when listing relations (#2403)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants