amoghrajesh commented on issue #57336:
URL: https://github.com/apache/airflow/issues/57336#issuecomment-3450728378
The local file system backend uses connection model but it has a back compat
shim that should take care of the import of sdk vs models. I tried with the
same dag and configuration as you @adrian-edbert and it works just fine for me.
DAG:
```shell script
from __future__ import annotations
from airflow.providers.standard.operators.python import PythonOperator
from airflow import DAG
def print_connection():
from airflow.sdk.bases.hook import BaseHook
worker_conn = BaseHook.get_connection("worker_connection_env")
print(f"worker_connection_env : {worker_conn}")
with DAG(
dag_id='test_dag',
catchup=False,
schedule=None
) as dag:
test = PythonOperator(task_id='task3', python_callable=print_connection)
test
```
Could you explain what you have done different?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]