Skip to content

Commit 99e8880

Browse files
committed
Refactor dag
- Separate gencon_index to it's own project - Replace literal paths and URL's to environment variables
1 parent 6ab4883 commit 99e8880

File tree

13 files changed

+36
-655
lines changed

13 files changed

+36
-655
lines changed

cob_datapipeline/gencon_ingest_dag.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from airflow.providers.slack.notifications.slack import send_slack_notification
1212
from airflow.models.connection import Connection
1313
from airflow.providers.amazon.aws.operators.s3 import S3ListOperator
14-
from airflow.operators.python_operator import PythonOperator
1514

1615
"""
1716
INIT SYSTEMWIDE VARIABLES
@@ -25,6 +24,11 @@
2524

2625
SCHEDULE_INTERVAL = Variable.get("GENCON_INDEX_SCHEDULE_INTERVAL")
2726

27+
GENCON_INDEX_VERSION = Variable.get("GENCON_INDEX_VERSION")
28+
GENCON_INDEX_PATH = Variable.get("GENCON_INDEX_PATH")
29+
GENCON_TEMP_PATH = Variable.get("GENCON_TEMP_PATH")
30+
GENCON_CSV_S3 = Variable.get("GENCON_CSV_S3")
31+
2832
# Get S3 data bucket variables
2933
AIRFLOW_S3 = BaseHook.get_connection("AIRFLOW_S3")
3034
AIRFLOW_DATA_BUCKET = Variable.get("AIRFLOW_DATA_BUCKET")
@@ -69,7 +73,11 @@
6973
"AWS_ACCESS_KEY_ID": AIRFLOW_S3.login,
7074
"AWS_SECRET_ACCESS_KEY": AIRFLOW_S3.password,
7175
"BUCKET": AIRFLOW_DATA_BUCKET,
76+
"GIT_BRANCH": GENCON_INDEX_VERSION,
7277
"HOME": AIRFLOW_USER_HOME,
78+
"GENCON_INDEX_PATH": GENCON_INDEX_PATH,
79+
"GENCON_TEMP_PATH": GENCON_TEMP_PATH,
80+
"GENCON_CSV_S3": GENCON_CSV_S3,
7381
"SOLR_AUTH_USER": SOLR_CONN.login if SOLR_CONN.login else "",
7482
"SOLR_AUTH_PASSWORD": SOLR_CONN.password if SOLR_CONN.password else "",
7583
"SOLR_WEB_URL": tasks.get_solr_url(SOLR_CONN, CONFIGSET),

cob_datapipeline/scripts/gencon_dags/.bundle/config

Lines changed: 0 additions & 3 deletions
This file was deleted.

cob_datapipeline/scripts/gencon_dags/.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

cob_datapipeline/scripts/gencon_dags/Gemfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

cob_datapipeline/scripts/gencon_dags/Gemfile.lock

Lines changed: 0 additions & 127 deletions
This file was deleted.

cob_datapipeline/scripts/gencon_dags/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)