Skip to content

Commit

Permalink
Merge branch 'main' of github.com:datacoves/datacoves_training into f…
Browse files Browse the repository at this point in the history
…eature/JANEWHITAKERORRUM
  • Loading branch information
Janewhitakerorrum committed Nov 21, 2024
2 parents 377b4a3 + a924a9c commit 22c88bd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: # yamllint disable-line rule:truthy
pull_request:
types:
- closed
push:
branches:
- main
paths:
Expand All @@ -30,7 +31,7 @@ jobs:
# Perform the deployment to Prod
build:
# Need to make sure that when the PR was closed, it was actually merged.
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
# if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'

name: Deployment Script
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions orchestrate/dags/sample_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@
default_args={
"start_date": datetime.datetime(2023, 1, 1, 0, 0),
"owner": "Mayra Pena",
"email": "mayra@datacoves.com",
"email": "mayra@example.com",
"email_on_failure": True,
"retries": 3,
},
description="Daily dbt run",
schedule_interval="0 12 * * *",
schedule="0 12 * * *",
tags=["version_1"],
catchup=False,
)
def sample_dag():
run_dbt = DatacovesDbtOperator(
task_id="run_dbt", bash_command="dbt debug"
task_id="run_dbt", bash_command="dbt run - s country_codes"
)


Expand Down
3 changes: 2 additions & 1 deletion orchestrate/dags_yml_definitions/sample_dag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: "Daily dbt run"
schedule_interval: "0 12 * * *"
schedule: "0 12 * * *"
tags:
- version_1
default_args:
Expand All @@ -8,6 +8,7 @@ default_args:
# Replace with the email of the recipient for failures
email: [email protected]
email_on_failure: true
retires: 3
catchup: false

nodes:
Expand Down
2 changes: 2 additions & 0 deletions transform/.dbt_coves/templates/source_props.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sources:
- name: {{ relation.schema }}
{%- if source_database %}
database: {{ source_database }}
tags:
- daily_run_airbyte
{%- endif %}
tables:
- name: {{ relation.name }}
Expand Down
2 changes: 1 addition & 1 deletion transform/.dbt_coves/templates/staging_model_props.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

models:
- name: stg_{{relation.schema | lower }}_{{model | lower }}
description: 'TESTING'
description: ''
columns:
{%- for cols in nested.values() %}
{%- for col in cols %}
Expand Down
2 changes: 1 addition & 1 deletion transform/models/L1_staging/country_data/_country_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sources:
- daily_run_airbyte
tables:
- name: COUNTRY_POPULATIONS
description: 'A country populations table.'
description: 'Raw population information from Github Datasets repository..'

0 comments on commit 22c88bd

Please sign in to comment.