Home > Net >  How can I select dbt models by `meta` field?
How can I select dbt models by `meta` field?

Time:02-02

I am trying to figure out how and if I can select dbt model by their meta field?

My dbt model documentation yaml file looks as follows:

 - name: my_table
    description: my table description
    meta:
      owner:
        - Analytics
    config:
      tags:
        - common
...

Now, I can select models by the defined tag with the command below:

dbt ls --select tag:common --resource-type model

Now, I would like to know how I can select models using the meta field information?

I tried the following, but this didn't work.

dbt ls --select meta.owner:Analytics

Thank you for any help!

CodePudding user response:

meta properties are under config so you should be able select them like this example:

dbt ls --select config.meta.owner:"team1"

  • Related