Madison Schott
08/12/2021, 10:02 PMNoah Holm
08/13/2021, 12:55 PMMadison Schott
08/13/2021, 1:32 PMNoah Holm
08/13/2021, 1:41 PMMadison Schott
08/13/2021, 1:54 PM# specify a base image
FROM prefecthq/prefect:latest
WORKDIR dbt_snowflake/
COPY . .
# install all dependencies
RUN pip install -U pip
RUN pip install dbt==0.17.2
STORAGE = Docker(registry_url='xx',
image_name='prefect-flows',
dockerfile='/Users/madisonschott/dbt_snowflake/DockerFile')
user_profile_dbt_run = dbt_task(helper_script = "cd /Users/madisonschott/dbt_snowflake",
command='dbt run')
Noah Holm
08/13/2021, 2:09 PMdbt_snowflake
the path that you cd into shouldn’t have your local mac’s path. I think you should "cd dbt_snowflake"
You could check locally where your dbt project is within the image with docker run --rm -it <imagename> sh
, that way you should see where you need to cdDBT_REPO_PATH = "/tmp/dbt"
dbt = DbtShellTask(
helper_script=f"cd {DBT_REPO_PATH}",
log_stderr=True,
log_stdout=True,
profiles_dir=DBT_REPO_PATH,
stream_output=True,
checkpoint=False,
)
Then I run it in the flow with dbt(command="dbt run")
Madison Schott
08/13/2021, 2:20 PMdbt_kwargs
do I even need to specify the profiles_dir?Noah Holm
08/13/2021, 2:22 PMJ. Martins
08/13/2021, 2:28 PMMadison Schott
08/13/2021, 2:49 PMfatal: Not a dbt project (or any of the parent directories). Missing dbt_project.yml file
J. Martins
08/13/2021, 3:06 PMMadison Schott
08/13/2021, 3:07 PMEncountered an error while reading the project:
ERROR: Runtime Error
Could not find profile named 'winc_dev'
J. Martins
08/13/2021, 3:09 PMMadison Schott
08/13/2021, 3:09 PMJ. Martins
08/13/2021, 3:10 PMMadison Schott
08/13/2021, 3:16 PM