Skip to content

Commit

Permalink
Exclude extractor task from dev run
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-snx committed Aug 22, 2024
1 parent bbd4866 commit fb25b42
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions scheduler/dags/v3_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@ def create_dag(network, rpc_var, target='dev'):

latest_only_task = LatestOnlyOperator(task_id=f"latest_only_{version}", dag=dag)

extract_task_id = f"extract_{version}"
config_file = f"configs/{network}.yaml"
extract_task = create_docker_operator(
dag=dag,
task_id=extract_task_id,
config_file=config_file,
image="data-extractors",
command=None,
network_env_var=rpc_var,
)

transform_task_id = f"transform_{version}"
transform_task = create_docker_operator(
dag=dag,
Expand All @@ -92,7 +81,21 @@ def create_dag(network, rpc_var, target='dev'):
network_env_var=rpc_var
)

latest_only_task >> extract_task >> transform_task >> test_task
if target == 'prod':
extract_task_id = f"extract_{version}"
config_file = f"configs/{network}.yaml"
extract_task = create_docker_operator(
dag=dag,
task_id=extract_task_id,
config_file=config_file,
image="data-extractors",
command=None,
network_env_var=rpc_var,
)

latest_only_task >> extract_task >> transform_task >> test_task
else:
latest_only_task >> transform_task >> test_task

return dag

Expand Down

0 comments on commit fb25b42

Please sign in to comment.