-
Notifications
You must be signed in to change notification settings - Fork 79
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
Relationship tests rendering in docs on the to
model instead of the model the test was defined in
#181
Comments
to
model instead of the model the test was defined in
@mascah Thanks for opening! I agree, this is weird. The relationship is from From mucking around with this locally, it does appear that the In any case, I believe the fix for this would need to come in the dbt-docs codebase, since all the requisite information is available in the manifest. I'm going to transfer this issue over there. |
For anyone interested in giving this a go, I think this is the right place to start poking: |
I'm going to try and play around with this, but I have a curiosity question about the best way to go about doing that. I'm not sure I exactly understand how the core I figure I could just clone this project and play with it from there to get a better understanding of how to make this change, but my curiosity is getting the better of me regarding where this code lives relative to the core dbt project. |
Fair question! This repository contains all the JS code that powers the static documentation site. When it's ready to ship—i.e., before we release a new version of dbt—we minify the JS in this repo and package it (together with all the HTML) into a single file, E.g. #157 fixed a dbt-docs bug, and then we shipped it via a dbt PR here: dbt-labs/dbt-core#2965 In order to test changes to this repository in development, you can follow the instructions in the README. |
Describe the bug
A clear and concise description of what the bug is. What command did you run? What happened?
relationships
tests are rendering on theto
model docs instead of the model that the test was defined in.Steps To Reproduce
In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.
my_second_dbt_model.sql
Expected behavior
A clear and concise description of what you expected to happen.
The relationship test renders in the model that the test was defined in. Otherwise, if I have a table that has foreign keys in many other tables (i.e. date dimension), they will all show up on the date dimension, which isn't as useful as if the foreign key relationship showed in the model it was defined in, i.e. a fact table.
The current behavior is also unusual since foreign keys in a traditional RDBMS are defined on the the foreign table pointing to the parent table, whereas now in the docs the parent table is pointing to all of the child tables.
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
macOS 10.15.6
The output of
python --version
:3.8.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: