$ dbt list --resource-type model --output json
I expected there to be a key like database_representation
The closest we currently get is alias, and some config detail
{
"package_name":"jaffle_shop",
"name":"customers",
"resource_type":"model",
"alias":"customers",
"config":{...},
"tags":[
],
"depends_on":{...}
}
The output of dbt --version:
installed version: 0.17.1
latest version: 0.17.1
Up to date!
Plugins:
- bigquery: 0.17.1
- snowflake: 0.17.1
- redshift: 0.17.1
- postgres: 0.17.1
Use case from Slack: listing the database objects that will be affected by a dbt run
Note that the node returned here does not include a key for "database_representation" (or ismilar)
I messed around quickly, and added database, schema, and identifer to the list of ALLOWED_KEYS here, and could got this far:.
$ dbt list --resource-type model --output json | jq '.database + .schema + .alias'
"analyticsdev_ccarrollcustomers"
"analyticsdev_ccarrollorders"
"analyticsdev_ccarrollstg_customers"
"analyticsdev_ccarrollstg_orders"
"analyticsdev_ccarrollstg_payments"
Which is pretty close — is that a better solution? That breaks down if we're going to include quoting in this though
This is interesting, I am having a very similar issue working on #2641 - we'll probably be able to mark this as a "good first issue" once that's done. As dbt is today, this will be kind of annoying to fix.
Most helpful comment
This is interesting, I am having a very similar issue working on #2641 - we'll probably be able to mark this as a "good first issue" once that's done. As dbt is today, this will be kind of annoying to fix.