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

Standardize use of --models syntax across CLI + docs site #36

Closed
emilieschario opened this issue Jul 11, 2019 · 4 comments · Fixed by #38
Closed

Standardize use of --models syntax across CLI + docs site #36

emilieschario opened this issue Jul 11, 2019 · 4 comments · Fixed by #38
Labels
bug Something isn't working

Comments

@emilieschario
Copy link

The --models syntax in the dbt docs lineage graph viewer produces different results from the command line.

From the command line, --models zendesk.base recognizes 4 models.

09:12:44 ~/repos/analytics/transform/snowflake-dbt/models/zendesk (1689-fix-zendesk-models) $ dbt run --models zendesk.base
Running with dbt=0.13.1
Found 221 models, 877 tests, 4 archives, 6 analyses, 253 macros, 8 operations, 4 seed files, 113 sources

09:26:11 | Concurrency: 8 threads (target='dev')
09:26:11 |
09:26:11 | 1 of 4 START view model emilie_scratch_staging.zendesk_organizations. [RUN]
09:26:11 | 2 of 4 START view model emilie_scratch_staging.zendesk_ticket_metrics [RUN]
09:26:11 | 3 of 4 START view model emilie_scratch_staging.zendesk_tickets....... [RUN]
09:26:11 | 4 of 4 START view model emilie_scratch_staging.zendesk_users......... [RUN]
09:26:16 | 3 of 4 OK created view model emilie_scratch_staging.zendesk_tickets.. [SUCCESS 1 in 4.62s]
09:26:16 | 1 of 4 OK created view model emilie_scratch_staging.zendesk_organizations [SUCCESS 1 in 4.84s]
09:26:16 | 2 of 4 OK created view model emilie_scratch_staging.zendesk_ticket_metrics [SUCCESS 1 in 4.97s]
09:26:17 | 4 of 4 OK created view model emilie_scratch_staging.zendesk_users.... [SUCCESS 1 in 5.41s]
09:26:22 |
09:26:22 | Finished running 4 view models in 43.02s.

Completed successfully

Done. PASS=4 ERROR=0 SKIP=0 TOTAL=4

In our dbt docs site, we get sad results https://gitlab-data.gitlab.io/analytics/dbt/snowflake/#!/overview

Screen Shot 2019-07-11 at 9 26 20 AM

My expected behavior would be to see the graph of each of those models and the + syntax to be how they flow/evolve/transform.

For my case, the solution was to use zendesk.base.*+ on the docs site. Thanks @cclaus for the tip!

Versions

09:26:26 ~/repos/analytics/transform/snowflake-dbt/models/zendesk (1689-fix-zendesk-models *) $ dbt --version
installed version: 0.13.1
   latest version: 0.14.0

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
09:29:29 ~/repos/analytics/transform/snowflake-dbt/models/zendesk (1689-fix-zendesk-models *) $ python --version
Python 3.7.1
@drewbanin
Copy link
Contributor

Thanks for the report @emilieschario! This graph selection logic can be a little gnarly in places, but I think the relevant part of the codebase to check out is over here: https://github.com/fishtown-analytics/dbt-docs/blob/master/src/app/services/node_selection_service.js#L230-L289

Let me know if this is something you'd like to have a go at!

@drewbanin
Copy link
Contributor

@emilieschario check out the changes in #38! I tested this by pulling GitLab's manifest.json file and validating that zendesk.base selected four nodes as expected :)

@emilieschario
Copy link
Author

@drewbanin you're the greatest! Thanks! Can't wait for 0.15.0 now 😄

@drewbanin
Copy link
Contributor

targeting 0.14.1 for this :)

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