Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jecos committed Mar 8, 2024
1 parent b23ef58 commit 5794f88
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
22 changes: 18 additions & 4 deletions dags/etl_import_fhir.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
from datetime import datetime

from airflow import DAG
from airflow.models.param import Param

from lib.config import fhir_import_config
from lib.operators.fhir_import import FhirCsvOperator
from airflow.models import Param, Variable

from lib.config import fhir_url, keycloak_client_secret_name, keycloak_url, aws_secret_name, aws_secret_access_key, aws_secret_secret_key, clinical_data_bucket, file_import_bucket, kube_config
from lib.operators.fhir_import import FhirCsvOperator, FhirCsvConfig

fhir_import_config = FhirCsvConfig(
fhir_url=fhir_url,
keycloak_client_secret_name = keycloak_client_secret_name,
keycloak_url=keycloak_url,
aws_credentials_secret_name= aws_secret_name,
aws_credentials_secret_access_key=aws_secret_access_key,
aws_credentials_secret_secret_key=aws_secret_secret_key,
clinical_data_bucket_name=clinical_data_bucket,
file_import_bucket_name=file_import_bucket,
id_service_url=Variable.get('id_service_url'),
kube_config=kube_config,
image=Variable.get('fhir_import_image')
).args("bio/ferlab/cqdg/etl/FhirImport")

with DAG(
dag_id='etl_import_fhir',
Expand Down
18 changes: 4 additions & 14 deletions dags/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Env:
clinical_data_bucket = Variable.get('clinical_data_bucket')
file_import_bucket = Variable.get('file_import_bucket')

keycloak_client_secret_name = 'keycloak-client-system-credentials'

default_params = {
'study_id': Param('ST0000017', type='string'),
'project': Param('cqdg', type='string'),
Expand Down Expand Up @@ -157,18 +159,6 @@ class Env:
etl_variant_normalized_config = etl_variant_config \
.with_spark_class('bio.ferlab.etl.normalized.RunNormalizedGenomic')

keycloak_client_secret_name = 'keycloak-client-system-credentials'

fhir_import_config = FhirCsvConfig(
fhir_url=fhir_url,
keycloak_client_secret_name = keycloak_client_secret_name,
keycloak_url=keycloak_url,
aws_credentials_secret_name= aws_secret_name,
aws_credentials_secret_access_key=aws_secret_access_key,
aws_credentials_secret_secret_key=aws_secret_secret_key,
clinical_data_bucket_name=clinical_data_bucket,
file_import_bucket_name=file_import_bucket,
id_service_url=Variable.get('id_service_url'),
kube_config=kube_config,
image=Variable.get('fhir_import_image')
).args("bio/ferlab/cqdg/etl/FhirImport")


0 comments on commit 5794f88

Please sign in to comment.