From 379920e21b6f795b3b344a501468b1e00b988826 Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Wed, 6 Mar 2024 23:31:24 +0100 Subject: [PATCH] simple test DAG --- airflow/dags/populate_opensearch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/airflow/dags/populate_opensearch.py b/airflow/dags/populate_opensearch.py index c091e82..97adb28 100644 --- a/airflow/dags/populate_opensearch.py +++ b/airflow/dags/populate_opensearch.py @@ -64,9 +64,7 @@ def bulk_load(): verify=False) for key in keys: - key_obj = hook.get_key(key, bucket_name=S3_BUCKET_NAME) - - s3_obj = hook.Object(S3_BUCKET_NAME, key) + s3_obj = hook.get_key(key, bucket_name=S3_BUCKET_NAME) with gzip.GzipFile(fileobj=s3_obj.get()["Body"]) as gzipfile: for line in gzipfile: session.post("https://opensearch-cluster.lot1-opensearch-cluster.svc.local/organization_index/_doc",