Skip to content

Commit

Permalink
traying to add dbt template
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciacatandi committed Apr 16, 2024
1 parent 003b99f commit 653c5d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pipelines/dbt_template/flows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
"""
DBT-related flows.
"""

from copy import deepcopy

from prefect.run_configs import KubernetesRun
from prefect.storage import GCS

from prefeitura_rio.pipelines_templates.run_dbt_model.flows import (
templates__run_dbt_model__flow,
)
from prefeitura_rio.pipelines_utils.state_handlers import (
handler_initialize_sentry,
handler_inject_bd_credentials,
)

from pipelines.constants import constants

template_dbt_flow = deepcopy(templates__run_dbt_model__flow)
template_dbt_flow.state_handlers = [
handler_inject_bd_credentials,
handler_initialize_sentry,
]
template_dbt_flow.storage = GCS(constants.GCS_FLOWS_BUCKET.value)
template_dbt_flow.run_config = KubernetesRun(image=constants.DOCKER_IMAGE.value)

0 comments on commit 653c5d9

Please sign in to comment.