You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The model documentation generated by dbt is sometimes inaccurate and includes additional columns that aren't actually present in the table/view.
Steps To Reproduce
Define a dbt source. Create a model and configure it to use a target schema and alias that match one of the tables from your source (or you can make the model name the same as your source table rather than using an alias). Build the model, run dbt compile, dbt docs generate, and dbt docs serve. The model's documentation will include the columns from the model as well as the columns from the source. The source documentation will also include columns from the model.
Expected behavior
The model documentation should only include the columns from that model itself.
dbt seems to expect that every "schema"."table" relation is unique. For example, you will get a compilation error if you have two models configured as follows:
dbt will not throw a compilation error, however, if a model is configured with the same "schema"."table" relation as a dbt source (but in a different database, of course).
dbt should either not allow configuring a model to have the same "schema"."table" as a source, or it should include database name in its expectation of relation uniqueness. The latter seems preferable if the goal is for dbt projects to be usable across multiple logical databases (e.g., with Snowflake).
Screenshots and log output
Source schema.yml and model .sql
Generated documentation for model (should only have LONELY_COL)
Generated documentation for source (should not have LONELY_COL)
System information
Which database are you using dbt with?
postgres
redshift
bigquery
snowflake
other (specify: ____________)
The output of dbt --version:
0.14.0
The operating system you're using:
macOS Mojave
The output of python --version:
2.7.10
The text was updated successfully, but these errors were encountered:
Thanks for this really thorough writeup @tjenkins! I totally agree with you: dbt should include the database name in its check for duplicate relation names. The fix here might also require code changes in the https:/fishtown-analytics/dbt-docs repo. I'm going to queue this up for our 0.15.0 release.
Describe the bug
The model documentation generated by dbt is sometimes inaccurate and includes additional columns that aren't actually present in the table/view.
Steps To Reproduce
Define a dbt source. Create a model and configure it to use a target schema and alias that match one of the tables from your source (or you can make the model name the same as your source table rather than using an alias). Build the model, run
dbt compile
,dbt docs generate
, anddbt docs serve
. The model's documentation will include the columns from the model as well as the columns from the source. The source documentation will also include columns from the model.Expected behavior
The model documentation should only include the columns from that model itself.
dbt seems to expect that every "schema"."table" relation is unique. For example, you will get a compilation error if you have two models configured as follows:
model 1:
model 2:
dbt will not throw a compilation error, however, if a model is configured with the same "schema"."table" relation as a dbt source (but in a different database, of course).
dbt should either not allow configuring a model to have the same "schema"."table" as a source, or it should include database name in its expectation of relation uniqueness. The latter seems preferable if the goal is for dbt projects to be usable across multiple logical databases (e.g., with Snowflake).
Screenshots and log output
Source schema.yml and model .sql
Generated documentation for model (should only have
LONELY_COL
)Generated documentation for source (should not have
LONELY_COL
)System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
macOS Mojave
The output of
python --version
:2.7.10
The text was updated successfully, but these errors were encountered: