-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airflow: Remove top level connection retrievals in 4 DAGs #1112
Labels
Comments
Successfully tested this: @task.bash()
def task_conn()->str:
conn = BaseHook.get_connection("here_bot")
os.environ['HOST'] = conn.host
os.environ['USER'] = conn.login
os.environ['PGPASSWORD'] = conn.password
return '''psql -h $HOST -U $USER -d bigdata -c "SELECT * FROM here.ta LIMIT 1;" ''' [2024-12-16T16:31:31.413+0000] {base.py:84} INFO - Retrieving connection 'here_bot'
[2024-12-16T16:31:31.450+0000] {subprocess.py:63} INFO - Tmp dir root location: /tmp
[2024-12-16T16:31:31.451+0000] {subprocess.py:75} INFO - Running command: ['/usr/bin/bash', '-c', 'psql -h $HOST -U $USER -d bigdata -c "SELECT * FROM here.ta LIMIT 1;" ']
[2024-12-16T16:31:31.470+0000] {subprocess.py:86} INFO - Output:
[2024-12-16T16:31:31.552+0000] {subprocess.py:93} INFO - link_dir | dt | tod | tx | length | mean | stddev | min_spd | max_spd | pct_50 | pct_85 | confidence | sample_size
... |
gabrielwol
added a commit
that referenced
this issue
Dec 16, 2024
gabrielwol
added a commit
that referenced
this issue
Dec 19, 2024
gabrielwol
added a commit
that referenced
this issue
Dec 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: