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

Add Description Display to dbt-lineagex Lineage Graphs #3

Open
KojiAndoJC opened this issue May 3, 2024 · 5 comments
Open

Add Description Display to dbt-lineagex Lineage Graphs #3

KojiAndoJC opened this issue May 3, 2024 · 5 comments

Comments

@KojiAndoJC
Copy link

I would like to propose an enhancement to the dbt-lineagex plugin to include dbt model descriptions within the lineage graph.

In Japan, many data professionals are more comfortable with Japanese than English. Our typical database schema design process involves:

  • Creating tables and columns with English names (referred to as "physical names")
  • Adding comments to tables and columns in Japanese to serve as domain-specific "logical names"

To illustrate this, I will attach an image adapted from the help documentation of A5:SQL Mk-2, a popular SQL development and ER diagram tool in Japan. This tool displays logical names alongside physical names in ER diagrams, demonstrating the clarity this feature brings. The original help page, written in Japanese, can be found here.

ERD

Implementing a similar feature in dbt-lineagex to show model descriptions directly in the lineage graphs would greatly benefit users like myself. While this feature might not be essential for everyone, a practical approach could be to display descriptions using HTML's title attribute for tooltips.

I would greatly appreciate your consideration of this feature request.

@zshandy
Copy link
Collaborator

zshandy commented May 3, 2024

Hi,

That is a very interesting suggestion, and I do think it can be proven useful for other languages as well. I have a follow-up question:
the comment that I should use, is it from column description that is present in the database or is it the column description in the schema.yml for dbt(https://docs.getdbt.com/reference/resource-properties/description)?

I am asking this because the graph is solely created by reading the manifest.json, no other file is read, so I was wondering if the description is supposed to be coming from the schema.yml, would it be present in manifest.json? But if the description is coming from the database, it is easier to implement since it could just read from database and append to the name.

Cheers,

@KojiAndoJC
Copy link
Author

Thank you for your interest and for raising this important question.

For our purposes, either source—database comments or descriptions in dbt’s schema.yml—would be suitable. We typically synchronize these using the persist_docs configuration, as outlined in the dbt documentation (https://docs.getdbt.com/reference/resource-configs/persist_docs).

From what I've checked, it appears that manifest.json does include table and column descriptions, which would be useful for integrating these into the lineage graphs. Confirming this detail would still be beneficial.

@zshandy
Copy link
Collaborator

zshandy commented May 4, 2024

I see, is it possible to show a snippet/sample manifest.json and its corresponding dbt models, so that when I am developing, I can test against it. Also, I am currently in the middle of another project, but I expect to resume in a month or so.

Cheers,

@KojiAndoJC
Copy link
Author

Thank you for your response. I can't share the actual project code due to confidentiality constraints, but I'm working on putting together a sample project that includes "logical names" for your testing. It might take a little time to assemble, but I'll make sure it's ready for you to use when you return to this project. Thanks for your understanding.

@zshandy
Copy link
Collaborator

zshandy commented May 5, 2024

Yes, I completely understand the confidentiality, and a sample(extremely simple) project would be perfect, a few tables is good enough!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants