In order to install the apache-airflow-providers-odbc, it’s not enough to simply add apache-airflow-providers-odbc to your requirements.txt. You have to add the following to your Dockerfile because the Airflow image doesn’t have the required dependencies for pyodbc:
FROM quay.io/astronomer/ap-airflow:2.1.1-buster-onbuild
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
g++ \
unixodbc-dev \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install apache-airflow-providers-odbc