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

Fix code example for listing exposures based on resource type #5469

Merged
merged 3 commits into from
May 14, 2024

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented May 8, 2024

Preview

What are you changing in this pull request and why?

Update the code example so it makes more sense.

Caveat: I didn't actually run the code in my proposed changes, but the current example definitely doesn't look right.

Checklist

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:12am

@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels May 8, 2024
@dbeatty10 dbeatty10 marked this pull request as ready for review May 8, 2024 15:02
@dbeatty10 dbeatty10 requested a review from a team as a code owner May 8, 2024 15:02
Copy link
Collaborator

@runleonarun runleonarun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving

@@ -258,7 +258,7 @@ The `exposure` method is used to select parent resources of a specified [exposur
```bash
dbt run --select "+exposure:weekly_kpis" # run all models that feed into the weekly_kpis exposure
dbt test --select "+exposure:*" # test all resources upstream of all exposures
dbt ls --select "+exposure:*" --resource-type snowplow # list all sources of type "snowplow" upstream of all exposures
dbt ls --select "+exposure:*" --resource-type source # list all source tables upstream of all exposures
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lines up with the "resource method" section of this page:

Note: This method doesn't work for sources, so use the --resource-type option of the list command instead:
dbt list --resource-type source

And when I looked at the usage of the dbt ls command:

[--resource-type {model,semantic_model,source,seed,snapshot,metric,test,exposure,analysis,default,all}]

@runleonarun runleonarun enabled auto-merge (squash) May 14, 2024 00:06
@runleonarun runleonarun merged commit 057ad4a into current May 14, 2024
11 checks passed
@runleonarun runleonarun deleted the dbeatty10-patch-2 branch May 14, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants