简体   繁体   中英

How can I select dbt models by `meta` field?

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!

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM