我正在尝试使用Airflow Hooks连接到Mssql Server,但抛出以下错误:
Broken DAG: [/usr/local/airflow/dags/odoo_customer_sql.py] No module named 'pymssql'
我的代码是:
hook = MsSqlHook(mssql_conn_id='ofo_sql_server')
conn = hook.get_conn()
return conn
P.S:我正在使用的Docker容器包括:
webserver:
image: puckel/docker-airflow:1.10.1
build:
context: https://github.com/puckel/docker-airflow.git#1.10.1
dockerfile: Dockerfile
args:
AIRFLOW_DEPS: gcp_api,s3, mssql, pyodbc
PYTHON_DEPS: sqlalchemy==1.2.0, pyodbc == 4.0.27, pymssql == 2.1.3
答案 0 :(得分:0)
template<typename ...Arg>
void function1(Arg&& ...arg) // pack the argument
{
function(std::forward<Arg>(arg)...);//unpack and call the relevant function
}
这应该可以解决问题。