You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/14 18:03:00 UTC

[jira] [Commented] (AIRFLOW-6296) add mssql odbc hook

    [ https://issues.apache.org/jira/browse/AIRFLOW-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17284459#comment-17284459 ] 

ASF GitHub Bot commented on AIRFLOW-6296:
-----------------------------------------

dstandish edited a comment on pull request #6850:
URL: https://github.com/apache/airflow/pull/6850#issuecomment-676500165


   > Is it possible to use turbodbc with this as well, or would that have to be a separate custom hook?
   
   Support could be added easily because the odbc conn str can be reused.
   
   Internally what I did was add this method so you can choose turbodbc client optionally:
   
   ```python
       def get_turbodbc_connection(self, turbodbc_options: Optional[dict] = None):
           # imported locally so turbodbc can be optional
           import turbodbc
           from turbodbc import make_options
           from turbodbc_intern import Megabytes
   
           default_options_kwargs = dict(
               read_buffer_size=Megabytes(300),
               large_decimals_as_64_bit_types=True,
               prefer_unicode=True,
               autocommit=True,
           )
           turbodbc_options = make_options(**{**default_options_kwargs, **(turbodbc_options or {})})
           return turbodbc.connect(connection_string=self. odbc_connection_string, turbodbc_options=turbodbc_options)
   ```
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> add mssql odbc hook
> -------------------
>
>                 Key: AIRFLOW-6296
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6296
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks
>    Affects Versions: 1.10.7
>            Reporter: Daniel Standish
>            Assignee: Daniel Standish
>            Priority: Major
>             Fix For: 2.0.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)