dagster
dagster copied to clipboard
[docs] - Configure arbitrary cli args on the dbt_cli_resource
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 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 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.
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.