File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
dags/veda_data_pipeline/groups Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,16 @@ def check_collection_exists_task(ti=None):
6464def generate_collection_task (ti = None ):
6565 import json
6666 config = ti .dag_run .conf
67+
68+ # If a STAC Collection is provided, we don't need to generate generate a collection from the dataset config.
69+ # We assume the collection being passed is a valid STAC Collection and the config is validated upstream (i.e. Ingest UI)
70+ if not config .get ("collection" ): # Only the dataset config has a collection key
71+ return config
72+
6773 airflow_vars = Variable .get ("aws_dags_variables" )
6874 airflow_vars_json = json .loads (airflow_vars )
6975 role_arn = airflow_vars_json .get ("ASSUME_ROLE_READ_ARN" )
7076
71- # TODO it would be ideal if this also works with complete collections where provided - this would make the collection ingest more re-usable
7277 collection = generator .generate_stac (
7378 dataset_config = config , role_arn = role_arn
7479 )
You can’t perform that action at this time.
0 commit comments