Giter Club home page Giter Club logo

Comments (4)

gshank avatar gshank commented on June 10, 2024 1

We do that kind of resolution in the flags.py file, so I guess this is similar to that.

from dbt-core.

ChenyuLInx avatar ChenyuLInx commented on June 10, 2024

We should write some brief docs about how selector works in general and have that added to the repo as a read me

from dbt-core.

ChenyuLInx avatar ChenyuLInx commented on June 10, 2024

@gshank What I found is that the indirect selection in selectors.yml works, but you cannot overwrite it with args passed in from CLI.

So for this jaffle shop model orders, I defined a selectors.yml looking like this

selectors:
  - name: nodes_to_joy
    definition:
      union:
        - method: path
          value: models/marts/orders.sql
          children: false
          parents: false
          indirect_selection: buildable

And by changing the indirect_selection value and run dbt ls --selector nodes_to_joy, I found that the number of things being selected goes from 3 to 4, which means it works.
But if I try to run dbt ls --selector nodes_to_joy --indirect-selection eager with buildable as a value inside, I see effect of buildable indirect selection.
If I do not specify indirect-selection in the yaml selectors file, I see the effect of eager and can't overwrite it with CLI args.

This doesn't match this PR description but matches what Doug said in his issue. Thouths? Any issue with the way I test?

from dbt-core.

ChenyuLInx avatar ChenyuLInx commented on June 10, 2024

I did find out the reason for the behavior Doug mentioned is that the rendered.selectors_dict here does not contain a resolved dict that has default value inside.

@gshank do you know in other places how do we resolve these kind of stuff? I think we should probably setup a patten to do resolution(CLI, env var, project file definition).

from dbt-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.