You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "TJaniF (via GitHub)" <gi...@apache.org> on 2025/03/25 14:17:44 UTC
[PR] Block orm access on deprecated AIRFLOW__CORE__SQL_ALCHEMY_CONN [airflow]
TJaniF opened a new pull request, #48240:
URL: https://github.com/apache/airflow/pull/48240
Adding the deprecated config to the block.
Testing dag:
```
from airflow.decorators import dag, task
@dag
def my_test_dag():
@task
def my_direct_db_access_task():
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
import os
sql_alchemy_conn = os.environ["AIRFLOW__CORE__SQL_ALCHEMY_CONN"]
conn_url = f"{sql_alchemy_conn}/postgres"
engine = create_engine(conn_url)
stmt = """SELECT version_num
FROM alembic_version;"""
with Session(engine) as session:
result = session.execute(stmt)
print(result.all()[0][0])
my_direct_db_access_task()
my_test_dag()
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Block orm access on deprecated AIRFLOW__CORE__SQL_ALCHEMY_CONN [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on PR #48240:
URL: https://github.com/apache/airflow/pull/48240#issuecomment-2751476019
We can ignore the provider wheel failure here.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Block orm access on deprecated AIRFLOW__CORE__SQL_ALCHEMY_CONN [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham merged PR #48240:
URL: https://github.com/apache/airflow/pull/48240
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org