alexmc-ms opened a new issue #10982:
URL: https://github.com/apache/airflow/issues/10982
Apache Airflow version:
1.10.9, 1.10.11
Kubernetes version (if you are using kubernetes) (use kubectl version):
N/A
Environment:
Cloud provider or hardware configuration: Azure
OS (e.g. from /etc/os-release): Debian9
Kernel (e.g. uname -a): custom Linux
Database: MSSQL ODBC
Install tools:
Others:
What happened:
Running initdb produces tables that have string columns as type VARCHAR.
All Airflow queries produce string types as NVARCHAR. As might be expected,
this makes all queries very expensive since query indexes can't be used.
What you expected to happen:
Expectation is by default the alembic migrations called by initdb will use
the same string datatype when setting up the initial tables that Airflow
queries will use when querying the database.
Is there some flag to force this?
Is the best workaround to have alembic produce the SQL, change all the
VARCHARs to NVARCHARs, and then apply the script manually?
How to reproduce it:
1. Start with a blank db
2. Run 'airflow initdb'
3. Run any Airflow query
4. View the query in MSSQL
Anything else we need to know:
sql_alchemy_conn=mssql+pyodbc://{username}:{password}@{server}:1433/{database
name}?driver=ODBC+Driver+17+for+SQL+Server
----------------------------------------------------------------
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:
[email protected]