Ken Nguyen
04/05/2022, 3:43 PMschema
within the profiles.yml), and have the dbt task within that flow output to a schema of the user’s choice.Kevin Kho
04/05/2022, 3:47 PMyaml
file in general. You can with the yaml
package. Prefect has code that does some of this here but it’s a bit hard to follow so I think it would just be easier to try playing with that Python library.Ken Nguyen
04/05/2022, 4:49 PMdbt_kwargs(dict, optional): keyword arguments used to populate the profiles.yml file
reading through the code for DbtShellTask
I’m going to try that out first, then if that doesn’t work I’ll try out the yml package.Matthias
04/05/2022, 4:52 PMprofiles.yml
, you could do something like:
...
schema: "{{ env_var('DBT_SCHEMA') }}"
...
and then set the DBT_SCHEMA
environment variable from within a task using the input parameter.Ken Nguyen
04/05/2022, 5:05 PMMatthias
04/05/2022, 5:47 PMenv
argument https://docs.prefect.io/api/latest/tasks/dbt.html#dbtshelltask. So no need to create an extra task 😄Ken Nguyen
04/05/2022, 5:57 PM