kazanzhy opened a new pull request, #23971:
URL: https://github.com/apache/airflow/pull/23971

   Now we have 
[DbApiHook.run()](https://github.com/apache/airflow/blob/637a8b8af132e6231756160a3f6ce7ed789abaf6/airflow/hooks/dbapi.py#L163)
 method that is used by many other hooks.
   
   Also there are following hooks that overrides this method:
   * 
[DatabricksSqlHook.run()](https://github.com/apache/airflow/blob/ec6761a5c0d031221d53ce213c0e42813606c55d/airflow/providers/databricks/hooks/databricks_sql.py#L154)
   * 
[ExasolHook.run()](https://github.com/apache/airflow/blob/ec6761a5c0d031221d53ce213c0e42813606c55d/airflow/providers/exasol/hooks/exasol.py#L135)
   * 
[SnowflakeHook.run()](https://github.com/apache/airflow/blob/ec6761a5c0d031221d53ce213c0e42813606c55d/airflow/providers/snowflake/hooks/snowflake.py#L287)
   * 
[PrestoHook.run()](https://github.com/apache/airflow/blob/ec6761a5c0d031221d53ce213c0e42813606c55d/airflow/providers/presto/hooks/presto.py#L242)
   * 
[TrinoHook.run()](https://github.com/apache/airflow/blob/ec6761a5c0d031221d53ce213c0e42813606c55d/airflow/providers/trino/hooks/trino.py#L272)
   
   I did all possible to make them as similar as possible, but some of them 
have peculiarities:
   * SnowflakeHook could split a string into a few statements
   * DatabricksSqlHook could split a string into a few statements, and each 
statement is run using a separate connection
   * ExasolHook uses `pyexasol` which doesn't have a reusable cursor
   * PrestoHook takes additional deprecated `hql` parameter and runs 
`_strip_sql(sql)`
   * TrinoHook also takes additional deprecated `hql` parameter and runs 
`_strip_sql(sql)`
   


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