From 46e69ee4e5e7205570a3496a750c06acdfec4efe Mon Sep 17 00:00:00 2001 From: Laysa de Sousa Bitencourt Date: Thu, 18 Apr 2024 16:08:32 -0300 Subject: [PATCH] test connection --- dags/stellar_etl_airflow/test_sources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dags/stellar_etl_airflow/test_sources.py b/dags/stellar_etl_airflow/test_sources.py index 1445be1b..2d6c2641 100644 --- a/dags/stellar_etl_airflow/test_sources.py +++ b/dags/stellar_etl_airflow/test_sources.py @@ -4,7 +4,7 @@ from airflow import DAG, settings from airflow.models import DagBag, DagRun, TaskInstance, Variable from airflow.operators.python_operator import PythonOperator -from airflow.providers.google.cloud.hooks.gcs import GoogleCloudStorageHook +from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.utils.state import State from google.cloud import bigquery from google.oauth2 import service_account @@ -32,7 +32,8 @@ def get_from_with_combinedExport(): # ) # Create a hook - gcs_hook = GoogleCloudStorageHook(key_path=key_path) + gcs_conn = Variable.get("google_cloud_storage_default") + gcs_hook = GCSHook(google_cloud_storage_conn_id=gcs_conn) # Download the file and get its content, it runs 47 times day 16th of april file_content = gcs_hook.download(