dbt-labs/dbt-core

[Bug] improper relation name (too many dotted names)

Ilsaffff opened this issue · 3 comments

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I'm encountering an issue with dbt & dbt-postgres.
This happens during --full-refresh.
It inserts the schema at the beginning and in the middle.
rddm - schema
rddm_dwh is the name of the database.
event - table
Database Error in seed event (seeds/bp/event.csv)
improper relation name (too many dotted names): rddm.rddm_dwh.rddm_bp_seeds.event

Expected Behavior

Tables full-refreshed

Steps To Reproduce

  1. Create seeds or tables(views)
  2. Enter command dbt seed --full-refresh or dbt run --full-refresh

Relevant log output

No response

Environment

- OS: macOS
- Python: 3.10
- dbt: 1.7.13

Which database adapter are you using with dbt?

postgres

Additional Context

dbt_project.yml

seeds:
  dbt_vault:
    schema: seeds
    bp:
      schema: bp_seeds
    bd:
      schema: bd_seeds

profiles.yml

schema: rddm

09:51:13 1 of 3 START seed file rddm_rddm.bp_seeds.event ................................ [RUN]
09:51:13 2 of 3 START seed file rddm_rddm.seeds.federal_district ........................ [RUN]
09:51:13 3 of 3 START seed file rddm_rddm.seeds.region .................................. [RUN]
09:51:13 3 of 3 ERROR loading seed file rddm_rddm.seeds.region .......................... [ERROR in 0.05s]
09:51:13 2 of 3 ERROR loading seed file rddm_rddm.seeds.federal_district ................ [ERROR in 0.05s]
09:51:13 1 of 3 ERROR loading seed file rddm_rddm.bp_seeds.event ........................ [ERROR in 0.05s]
09:51:13
09:51:13 Finished running 3 seeds in 0 hours 0 minutes and 0.17 seconds (0.17s).
09:51:13
09:51:13 Completed with 3 errors and 0 warnings:
09:51:13
09:51:13 Database Error in seed region (seeds/region.csv)
improper relation name (too many dotted names): rddm.rddm_dwh.rddm_rddm.seeds.region
09:51:13
09:51:13 Database Error in seed federal_district (seeds/federal_district.csv)
improper relation name (too many dotted names): rddm.rddm_dwh.rddm_rddm.seeds.federal_district
09:51:13
09:51:13 Database Error in seed event (seeds/bp/event.csv)
improper relation name (too many dotted names): rddm.rddm_dwh.rddm_rddm.bp_seeds.event

Did you customize any of the generate_xxx_name() macros, especially generate_schema_name()?

Did you customize any of the generate_xxx_name() macros, especially generate_schema_name()?

Yes! It was drop_table(), drop_table() uses in full refresh, I remove custom macros and it works
Thanks @b-per!

Sorry guys, thank you for fast response! ❤️