I'm using Dagster with DBT and i was wondering how...
# ask-community
I'm using Dagster with DBT and i was wondering how can i run a custom command , i'm talking about this : https://docs.dagster.io/_apidocs/libraries/dagster-dbt#resources-dbt-core let's say i want to run the command
from dbt using the dbt cli ressource . i understood that if i want to do an
i can pass a
parameter to use it in the function . i tried this but it doesn't work
Copy code
resources = {
    "dbt": dbt_cli_resource.configured(
            "project_dir": DBT_PROJECT_PATH,
            "profiles_dir": DBT_PROFILES,

def custom_run(context):
The end goal is to do a custom
dbt build --select mymodel+
dagster bot responded by community 1
🤖 1
Hi! The op context object provides access to all of your op config and resources so you need to specify that you want to access the dbt resource. Assuming the rest of the code is correct (I don’t know enough to verify your kwargs in the build call) the correct way to call is:
Copy code
def custom_run(context):
Indeed i was missing this resource_key . thank you very much.
No problem! Always happy to help daggy love