2

essentially I use puckel/docker-airflow Docker image modified for using pyodbc and cx_oracle drivers and PythonVirtualenvOperator, but when I try to create sqlalchemy engine

db_engine = sqlalchemy.create_engine('mssql+pyodbc://SK-BI-02/DWH?driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.1.1&domain=domain&password={}&login=user&port=1433'.format(_pass))
target_frame.to_sql('some_path',db_engine,'scheme',index=False,if_exists='append')

it continues to give such traceback

sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('HY000', '[HY000] [Microsoft][ODBC Driver 17 for SQL Server]SSPI Provider: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_0) (851968) (SQLDriverConnect)')
(Background on this error at: http://sqlalche.me/e/dbapi)

how to make it works or maybe there is another way to upload DataFrame from airflow in a container?

eugeneral
  • 123
  • 1
  • 6

1 Answers1

0

after hours of suffering the only thing that is worked for me is the usage of FreeTDS driver instead of Microsft ODBC one, following answers for this question. Not sure but I guess it somehow related to Microsoft Auth of MSSQL and its security configuration...

eugeneral
  • 123
  • 1
  • 6