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

Lists in lineage graph are not in alphabetical order #234

Closed
pgoslatara opened this issue Feb 2, 2022 · 3 comments · Fixed by #235
Closed

Lists in lineage graph are not in alphabetical order #234

pgoslatara opened this issue Feb 2, 2022 · 3 comments · Fixed by #235
Labels
bug Something isn't working

Comments

@pgoslatara
Copy link
Contributor

Describe the bug

In the lineage graph the lists for resources, packages and tags are not in alphabetical order. While not a major issue this becomes an annoyance with large projects, especially the tags as we use these a lot.

Steps To Reproduce

Add tags to a few models and view the lineage graph. In the "tags" drop down list the tags will not be in order. Same applies to the "resources" and "packages" drop down lists.
image

Expected behavior

Lists are in alphabetical order.

Screenshots and log output

Not applicable.

The output of dbt --version:

installed version: 0.21.1
   latest version: 1.0.0

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 0.21.1
  - redshift: 0.21.1
  - bigquery: 0.21.1
  - snowflake: 0.21.1

Additional context

Add any other context about the problem here.

@pgoslatara pgoslatara added the bug Something isn't working label Feb 2, 2022
@pgoslatara pgoslatara mentioned this issue Feb 2, 2022
3 tasks
@emmyoop
Copy link
Member

emmyoop commented Apr 4, 2022

@pgoslatara thanks for submitting this issue. Alphabetizing both tags and packages will be a quality of life improvement for sure! However, we're purposefully listing resources out of alphabetical order, but in order of most used. Most of the time the search will be more a model and not an analysis so let's leave that ordering as it is.

Heading over to check out your PR next!

@pgoslatara
Copy link
Contributor Author

Thanks @emmyoop for picking this up. I have one curiosity, when you say "in order of most used", how does dbt define "used" here? Is it a raw count of models/seeds/exposures/etc. (I'm not a js person so hard for me to find this)?

@emmyoop
Copy link
Member

emmyoop commented Apr 4, 2022

@pgoslatara it's not something calculated/defined. It is an order we (manually) define and want to continue to define in this way since resource names are controlled by us. I was overly zealous calling it "order of most used". 😄 However, since the owner of the dbt project is defining the tags and packages to be any string and the list can get very (very) long, your suggestion makes sense to alphabetize there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants