AltimateAI / vscode-dbt-power-user

This extension makes vscode seamlessly work with dbt™: Auto-complete, preview, column lineage, AI docs generation, health checks, cost estimation etc
https://www.altimate.ai
MIT License
438 stars 85 forks source link

Ability to decrease parent or child lineage level #1171

Open thewhitetulip opened 2 months ago

thewhitetulip commented 2 months ago

Describe the feature

Currently when we look at the lineage of child or parent models, then we can not reduce them. We can keep adding parent or child tables, but we can't reduce them. In DBT cloud, we have a input bar where it defaults to 3+model+3 and we can keep changing on the left and right hand side to get the lineage which we want. I think it would help to have this feature in this plugin.

Right now, we only have the feature of adding child or parent models in the newlineagepanel. I would like to add a feature of reducing them. DBT Cloud gives you the ability to do this.

Describe alternatives you've considered

No response

Who will benefit?

Those who want to look at upstream or downstream lineage only

Are you willing to submit PR?

thewhitetulip commented 2 months ago

@mdesmet @anandgupta42

anandgupta42 commented 2 months ago

@thewhitetulip We had started working on it but never got to finish it : https://github.com/AltimateAI/vscode-dbt-power-user/pull/785

We may need to handle some tricky corner cases for node-level collapse. However, collapse should be easy to implement level-wise. Please share your view on how you plan to implement it.

Thanks once again for offering to contribute.

thewhitetulip commented 2 months ago

@anandgupta42 I need to check on how to implement. I am totally new to JS! I'll have a look and let you know. also for reference, do I need to pick up from #785?

thewhitetulip commented 2 months ago

@anandgupta42 How about instead of the current settings display of two buttons, we provide a textbox as an input and default it to 3+model+3 and then when people update either the upstream or the downstream then we redraw the lineage. that'll do away with the collapsing problem?

I mean this is how dbt cloud UI does it.