Hi all! Sometimes I’m a bit confused how to set ta...
# prefect-community
j
Hi all! Sometimes I’m a bit confused how to set task args when using built-in dbt tasks (such as dbt), Is this the correct syntax for setting a tag on the task? (reason I ask is i can’t see it in prefect cloud when I click into the task):
Copy code
dbt_run = dbt(
        command=dbt_run_command,
        task_args={"name": "dbt run", "tags": ["dbt-limit-1"]},
        upstream_tasks=[dbt_deps],
        dbt_kwargs=snowflake_credentials
    )
a
your syntax looks correct and the tags you mentioned are for task concurrency and should be visible here after registering your flow https://cloud.prefect.io/team/task-concurrency did you register?
could you perhaps also show your full flow definition, perhaps the dbt task is missing some configuration?
j
Ah great, thanks. I think the problem is that my task runs so quickly that when I look at that screen I never see it. Here’s my task definition:
Copy code
dbt = DbtShellTask(
    return_all=True,
    profile_name="snowflake_dbt",
    environment="prod",
    overwrite_profiles=True,
    set_profiles_envar=True,
    profiles_dir=f"{cwd}/repo/DBT",
    log_stdout=True,
    helper_script=f"cd repo/DBT",
    log_stderr=True,
    dbt_kwargs={
        "type": "snowflake",
        "account": SNOWFLAKE_ACCOUNT,
        "database": SNOWFLAKE_DATABASE,
        "warehouse": SNOWFLAKE_WAREHOUSE,
        "schema": SNOWFLAKE_SCHEMA,
        "user": SNOWFLAKE_USER,
        "role": SNOWFLAKE_ROLE,
        "threads": 12,
        "client_session_keep_alive": False
    },
)
a
this dbt configuration is perfect, this shouldn't be an issue perhaps it's indeed some UI latency then - are you good now? LMK if I can help
j
Thanks Anna! I was able to verify that it’s working now
👍 1