Hey folks :wave: Are there any example on how to t...
# prefect-dbt
a
Hey folks 👋 Are there any example on how to trigger dbt core on a Redshift target? Looking at
prefect-dbt
I see the available targets are Snowflake, Bigquery and Postgres, but not Redshift. Should I use the Postgres target? Any hint is much appreciated! 🙌
1
s
You might be able to make the postgres settings work, but I'm not sure. I believe your best bet would be to use an existing profiles.yml file, as with the "Using an existing profile" example, here:
Copy code
from prefect import flow
from prefect_dbt.cli.commands import DbtCoreOperation

@flow
def trigger_dbt_flow() -> str:
    result = DbtCoreOperation(
        commands=["pwd", "dbt debug", "dbt run"],
        project_dir="PROJECT-DIRECTORY-PLACEHOLDER",
        profiles_dir="PROFILES-DIRECTORY-PLACEHOLDER"
    ).run()
    return result

trigger_dbt_flow()
You could also request a Redshift target, here https://github.com/PrefectHQ/prefect-dbt/issues
a
Hey @Sean Williams 👋 Thank you very much!
👍 1
👋 1