-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add materialize_dbt_model template pipeline
- Loading branch information
Showing
6 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
from pipelines.templates.run_dbt_model.flows import * # noqa: F401, F403 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
MATERIALIZA MODELOS DO DBT. | ||
""" | ||
|
||
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.prefect import set_default_parameters | ||
from prefeitura_rio.pipelines_utils.state_handlers import handler_inject_bd_credentials | ||
|
||
from pipelines.constants import constants | ||
|
||
templates__run_dbt_model_smas__flow = deepcopy(templates__run_dbt_model__flow) | ||
templates__run_dbt_model_smas__flow.state_handlers = [handler_inject_bd_credentials] | ||
|
||
templates__run_dbt_model_smas__flow.storage = GCS(constants.GCS_FLOWS_BUCKET.value) | ||
templates__run_dbt_model_smas__flow.run_config = KubernetesRun( | ||
image=constants.DOCKER_IMAGE.value, | ||
labels=[ | ||
constants.RJ_SMFP_AGENT_LABEL.value, | ||
], | ||
) | ||
|
||
templates_run_dbt_model_smas_default_parameters = { | ||
"dataset_id": "dataset_id", | ||
"table_id": "table_id", | ||
} | ||
templates__run_dbt_model_smas__flow = set_default_parameters( | ||
templates__run_dbt_model_smas__flow, | ||
default_parameters=templates_run_dbt_model_smas_default_parameters, | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters