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

[Feature] add the primary key in the model level of the html generated by dbt docs serve #10034

Closed
3 tasks done
salimmoulouel opened this issue Apr 25, 2024 · 3 comments
Closed
3 tasks done
Labels
enhancement New feature or request

Comments

@salimmoulouel
Copy link

salimmoulouel commented Apr 25, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I would like to be able to find in the documentation the primary/foreign key generated by the dbt docs serve

Describe alternatives you've considered

image

Who will this benefit?

No response

Are you interested in contributing this feature?

i have a merge request ready.

Anything else?

No response

@dbeatty10
Copy link
Contributor

@salimmoulouel we can take a peek at your proposed PR(s) to see if this is functionality that we'd like to adopt or not.

Were your changes only in dbt-core (#10035), or were they in dbt-docs also?

If you needed changes to dbt-docs too, wanna share a link and I'll take a look?

@salimmoulouel
Copy link
Author

Hello @dbeatty10, at the moment, my alterations are solely within dbt-core. The necessity for this functionality stems from BigQuery's inability to accept multiple primary key declarations at the column level. Consequently, I must implement them at the model level. Currently, the dbt documentation pertains to the column level.

I think There are two potential solutions:

  1. Have dbt automatically convert primary key declarations from the column level to the model level for BigQuery.
  2. Incorporate primary key documentation at the model level.

I created the following issue in the dbt-bigquery repo
dbt-labs/dbt-bigquery#1186

@dbeatty10
Copy link
Contributor

Agreed that those would be the two potential solutions to consider.

Considering each potential solution

Potential solution 1

I don't think we'd be likely to adopt the 1st one of converting primary key declarations from the column level to the model level for dbt-bigquery.

If we did, we'd probably do it for all adapters and not just dbt-bigquery.

Potential solution 2

So the 2nd potential solution of incorporate primary key documentation at the model level seems like the more fruitful path to consider:

Next steps in the discussion

To focus the conversation on the most fruitful path, I'm going to close both #10034 and dbt-labs/dbt-bigquery#1186 in favor of dbt-labs/dbt-docs#507. We can always re-open them after further discussion if needed.

I'll see you over in dbt-labs/dbt-docs#507 to discuss further!

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@dbeatty10 dbeatty10 removed the triage label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants