在“airflow.cfg”文件中添加“postgresql”连接类型。
示例:
打开“airflow.cfg”文件
找到“[core]”和“[webserver]”部分中的“sql_alchemy_conn”行
使用以下格式将行更改为添加“postgresql”连接类型:
postgresql+psycopg2://{username}:{password}@{host}:{port}/{database}
例如:
sql_alchemy_conn = postgresql+psycopg2://airflow_user:airflow_pass@localhost:5432/airflow_db
保存并关闭“airflow.cfg”文件。
重新启动Airflow服务,以便更新配置。
上一篇:AirflowPostgresToGoogleCloudStorageOperator身份验证错误
下一篇:AirflowPubSubHook的acknowledge方法出现“__call__()gotanunexpectedkeywordargument'metadata'错误