Skip to content

Commit

Permalink
Merge pull request #90 from Synthetixio/feat/scheduler-add-test-dag
Browse files Browse the repository at this point in the history
Add test DAG to Scheduler
  • Loading branch information
Tburm authored Jul 30, 2024
2 parents c11f447 + de6cfc8 commit 3b37679
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
12 changes: 11 additions & 1 deletion scheduler/dags/v3_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ def create_dag(network, rpc_var):
network_env_var=rpc_var,
)

latest_only_task >> extract_task >> transform_task
test_task_id = f"test_{network}"
test_task = create_docker_operator(
dag=dag,
task_id=test_task_id,
config_file=None,
image="data-transformer",
command=f"dbt test --target {'prod' if network != 'optimism_mainnet' else 'prod-op'} --select tag:{network} --profiles-dir profiles --profile synthetix",
network_env_var=rpc_var
)

latest_only_task >> extract_task >> transform_task >> test_task

return dag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ models:
- name: market_address
description: "Market address"
data_type: text
tests:
- not_null
- name: market_symbol
description: "Market symbol"
data_type: text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ models:
- name: market_address
description: "Market address"
data_type: text
tests:
- not_null
- name: market_symbol
description: "Market symbol"
data_type: text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ models:
tests:
- not_null
- dbt_utils.accepted_range:
severity: warn
min_value: 0
inclusive: true
- name: exchange_fees
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ models:
- name: market_address
description: "Market address"
data_type: text
tests:
- not_null
- name: market_symbol
description: "Market symbol"
data_type: text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ models:
tests:
- not_null
- dbt_utils.accepted_range:
severity: warn
min_value: 0
inclusive: true
- name: exchange_fees
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ models:
- name: market_address
description: "Market address"
data_type: text
tests:
- not_null
- name: market_symbol
description: "Market symbol"
data_type: text
Expand Down

0 comments on commit 3b37679

Please sign in to comment.