dagster icon indicating copy to clipboard operation
dagster copied to clipboard

[docs] - Configure arbitrary cli args on the dbt_cli_resource

Open OwenKephart opened this issue 2 years ago • 2 comments

What's the issue or suggestion?

The dbt_cli_resource has a permissive schema, so if there is a "foo" command-line flag, then you can set that with dbt_cli_resource.configured({"foo": "some_val"}) and --foo some_val will be passed into every cli command the resource invokes.

This should be surfaced more obviously.

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

OwenKephart avatar Jul 20 '22 16:07 OwenKephart

@OwenKephart To clarify, the ask is that the info from here - specifically the vars property - is highlighted somewhere more obvious in the dbt docs, correct? Perhaps here in the dbt guide?

erinkcochran87 avatar Sep 16 '22 15:09 erinkcochran87

@erinkcochran87 it's a bit more general than the vars property -- basically, you can supply whatever config key you want to the dbt_cli_resource (for example "blah", which doesn't exist in that config schema), and if you do that, this will be stored as a "default flag", which will be passed in by default to any command that the dbt_cli_resource executes.

So it's more about the concept that you can pass in fields that are not listed in that api docs link, and the resource will do something with it.

OwenKephart avatar Sep 16 '22 21:09 OwenKephart

This can be done using DbtCli, since the user specifies the raw dbt CLI command to run.

See https://github.com/dagster-io/dagster/discussions/14477 for more details.

rexledesma avatar Jun 14 '23 13:06 rexledesma