-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-3167] [Bug] resource_type
selector method not returning expected results
#8730
Comments
resource_type
selector method not returning expected resultsresource_type
selector method not returning expected results
Thanks for opening Dave! I agree, according to our docs, this should work. I think the next step is to check if the |
I was able to reproduce that this doesn't work in dbt-core 1.6. Now we just need to see if it worked on 1.5 or 1.4. |
I am not sure if this actually ever worked! It looks like the code was added multiple years ago, but the docs only very recently: I agree it would be nice if it did work, within |
@jtcohen6 do you know why do we have both? |
@graciegoheen I think just history, and it's worth making this more consistent. In theory we support:
I don't know if we've ever actually supported:
|
Opened this issue to clarify what works currently and what doesn't: |
[Preview](https://docs-getdbt-com-git-dbeatty-source-resource-type-dbt-labs.vercel.app/reference/node-selection/methods#the-resource_type-method) ## What are you changing in this pull request and why? dbt-labs/dbt-core#8730 surfaced an area to provide more precise guidance how to select sources. ## 🎩 Before: <img width="832" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/5b97eb54-3669-417c-8332-581609d2fec1"> After: <img width="839" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/056abc36-96f1-441e-8667-3208d074cc1d"> ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) and [About versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) so my content adheres to these guidelines.
Although this doesn't work in 1.5.9, it did for me using 1.6.5 and 1.7.8:
Quickly scanning the changelogs for 1.6 and 1.7, I don't know what changed to cause this to work now though. I'm going to close this as "magically resolved". If someone knows the right PR to link this to, please share! 🙏 Also opened dbt-labs/docs.getdbt.com#5003 to update the docs. |
@dbeatty10 We should make sure we have a test in place so that this doesn't "magical break" in the future! |
Is this a new bug in dbt-core?
Current Behavior
using
dbt ls -s resource_type:source
returns no results in a project with sources, whiledbt ls --resource-type source
properly returns expected resultsExpected Behavior
each method should return all sources defined in my project
Steps To Reproduce
dbt ls -s resource_type:source
, see nothingdbt ls --resource-type source
see source nodeRelevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: