From df361e96f8bb01f44e42e440f2a5039cd7bc61e5 Mon Sep 17 00:00:00 2001 From: Hsin-Fang Chiang Date: Mon, 25 Oct 2021 16:30:25 -0700 Subject: [PATCH] Use input arguments to specify table name and path prefix --- argo-submit-preingest.sh | 4 ++++ manifests/preingest.yaml | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 argo-submit-preingest.sh diff --git a/argo-submit-preingest.sh b/argo-submit-preingest.sh new file mode 100755 index 00000000..2b27cbbd --- /dev/null +++ b/argo-submit-preingest.sh @@ -0,0 +1,4 @@ + +argo submit --serviceaccount=argo-workflow -p 'workflow-table-name=objectTable_tract' -p 'prefix=PREOPS-863' manifests/preingest.yaml +argo submit --serviceaccount=argo-workflow -p 'workflow-table-name=sourceTable_visit' -p 'prefix=PREOPS-863' manifests/preingest.yaml +argo submit --serviceaccount=argo-workflow -p 'workflow-table-name=forcedSourceTable' -p 'prefix=PREOPS-863' manifests/preingest.yaml diff --git a/manifests/preingest.yaml b/manifests/preingest.yaml index 67349610..95db1781 100644 --- a/manifests/preingest.yaml +++ b/manifests/preingest.yaml @@ -12,6 +12,10 @@ metadata: workflows.argoproj.io/version: ">= 3.0.0" spec: entrypoint: main + arguments: + parameters: + - name: workflow-table-name + - name: prefix volumes: - name: secret-vol secret: @@ -27,7 +31,7 @@ spec: - name: input-folder gcs: bucket: qserv-us-central1-argo-artifact - key: dc2/w_2021_40/input-parquet-source + key: "dp02/{{workflow.parameters.prefix}}/{{workflow.parameters.workflow-table-name}}/input-parquet" serviceAccountKeySecret: name: secret-argo-gcs-artifact key: qserv-dev-argo.json @@ -41,21 +45,21 @@ spec: - name: inparq gcs: bucket: qserv-us-central1-argo-artifact - key: "dc2/w_2021_40/input-parquet-source/{{item}}" + key: "dp02/{{workflow.parameters.prefix}}/{{workflow.parameters.workflow-table-name}}/input-parquet/{{item}}" serviceAccountKeySecret: name: secret-argo-gcs-artifact key: qserv-dev-argo.json - name: schema_abh gcs: bucket: qserv-us-central1-argo-artifact - key: dc2/w_2021_40/configs-source/schema.abh.source + key: "dp02/{{workflow.parameters.prefix}}/{{workflow.parameters.workflow-table-name}}/configs/schema.abh" serviceAccountKeySecret: name: secret-argo-gcs-artifact key: qserv-dev-argo.json - name: partition_config gcs: bucket: qserv-us-central1-argo-artifact - key: dc2/w_2021_40/configs-source/partition.json + key: "dp02/{{workflow.parameters.prefix}}/{{workflow.parameters.workflow-table-name}}/configs/partition.json" serviceAccountKeySecret: name: secret-argo-gcs-artifact key: qserv-dev-argo.json