diff --git a/dags/pull_here.py b/dags/pull_here.py index 66828a977..d789bc461 100644 --- a/dags/pull_here.py +++ b/dags/pull_here.py @@ -86,9 +86,9 @@ def load_data_run(download_url)->str: conn = BaseHook.get_connection("here_bot") os.environ['HOST'] = conn.host os.environ['LOGIN'] = conn.login - os.environ['PGPASSWORD'] = conn.password + os.environ['PW'] = conn.password os.environ['DOWNLOAD_URL'] = download_url - return '''curl $DOWNLOAD_URL | gunzip | psql -h $HOST -U $LOGIN -d bigdata -c "\\COPY here.ta_view FROM STDIN WITH (FORMAT csv, HEADER TRUE);" ''' + return '''curl $DOWNLOAD_URL | gunzip | PGPASSWORD=$PW psql -h $HOST -U $LOGIN -d bigdata -c "\\COPY here.ta_view FROM STDIN WITH (FORMAT csv, HEADER TRUE);" ''' # Create a task group for triggering the DAGs @task_group(group_id='trigger_dags_tasks') diff --git a/dags/pull_here_path.py b/dags/pull_here_path.py index 03fdbdb01..1e8d7fd56 100644 --- a/dags/pull_here_path.py +++ b/dags/pull_here_path.py @@ -81,9 +81,9 @@ def load_data(download_url)->str: conn = BaseHook.get_connection("here_bot") os.environ['HOST'] = conn.host os.environ['LOGIN'] = conn.login - os.environ['PGPASSWORD'] = conn.password + os.environ['PW'] = conn.password os.environ['DOWNLOAD_URL'] = download_url - return '''curl $DOWNLOAD_URL | gunzip | psql -h $HOST -U $LOGIN -d bigdata -c "\\COPY here.ta_path_view FROM STDIN WITH (FORMAT csv, HEADER TRUE);" ''' + return '''curl $DOWNLOAD_URL | gunzip | PGPASSWORD=$PW psql -h $HOST -U $LOGIN -d bigdata -c "\\COPY here.ta_path_view FROM STDIN WITH (FORMAT csv, HEADER TRUE);" ''' load_data(download_url)