Eric Mauser
07/16/2021, 7:54 PMwith Flow(
"dbt",
storage=Docker(
path="/flow.py",
stored_as_script=True
),
run_config=ECSRun()
) as flow:
repo = pull_dbt_repo()
dbt_kwargs = {
"type": "postgres",
# User/password auth
"user": PrefectSecret("DEV_DB_USER"),
"password": PrefectSecret("DEV_DB_PASSWORD"),
"database": PrefectSecret("DEV_DB_NAME"),
"port": PrefectSecret("DEV_DB_PORT"),
"threads": 1,
"client_session_keep_alive": False,
}
deps = dbt(
command='dbt deps',
dbt_kwargs=dbt_kwargs
)
flow.run()
dev:
outputs:
null:
client_session_keep_alive: false
database: !!python/object:prefect.client.secrets.Secret
name: DEV_DB_NAME
password: !!python/object:prefect.client.secrets.Secret
name: DEV_DB_PASSWORD
port: !!python/object:prefect.client.secrets.Secret
name: DEV_DB_PORT
threads: 1
type: postgres
user: !!python/object:prefect.client.secrets.Secret
name: DEV_DB_USER
target: null
~Kevin Kho
07/16/2021, 8:44 PMdbt()
call and see if that changed anything?flow.run()
and a registered flow?Eric Mauser
07/16/2021, 10:11 PMKevin Kho
07/16/2021, 10:12 PMflow.run()
as well as long as you have PREFECT__CLOUD__USE_LOCAL_SECRETS=false