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
Sean Williams
05/09/2023, 3:09 PM
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()
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.