MialLewis commented on issue #40056:
URL: https://github.com/apache/airflow/issues/40056#issuecomment-2153747994

   Here is a minimal dag that reproduces the issue:
   ```
   from airflow import DAG
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
   }
   
   with DAG(
       dag_id='issue_dag',
       default_args=default_args,
       start_date=days_ago(2),
       tags=['issue'],
   ) as dag:
   
       @dag.task
       def error_fn():
           import pandas as pd
           output_df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
           engine = _get_engine_from_conn(conn_id='MariaDB')
           output_df.to_sql(name='test_table', con=engine, schema='temp', 
if_exists='replace')
   
       def _get_engine_from_conn(conn_id):
           from airflow.providers.mysql.hooks.mysql import MySqlHook as hook
           db_hook = hook(mysql_conn_id=conn_id)
           engine = db_hook.get_sqlalchemy_engine()
           return engine
   
   error_task = error_fn()
   ```
   
   The connection I am using to a simple MariaDB of the latest version:
   
![image](https://github.com/apache/airflow/assets/95620982/915fba46-a001-4414-a0d4-30d1a354f20c)
   


-- 
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]

Reply via email to