我正在尝试使用Airflow创建与oracle数据库实例(oracle:thin)的连接.
I am trying to create a connection to an oracle db instance (oracle:thin) using Airflow.
根据他们的文档我输入了主机名,然后输入端口号和SID :
According to their documentation I entered my hostname followed by port number and SID:
主机:example:1524/sid
Host: example:1524/sid
其他字段填写为:
连接类型:Oracle
架构:用户名(文档说:将您的用户名用于架构)
Schema: username ( documentation says: use your username for schema )
登录:用户名
密码:* * *
建立连接后,它会为我尝试执行的每个查询( ORA-12514 )提供保存错误代码. 看来oracle不允许气流连接:
After connection is setup, it gives the save error code for every query that I tried to execute (ORA-12514). It seems like oracle doesn't let airflow to connect:
ORA-12514:TNS:侦听器当前不知道连接描述符中请求的服务
曾经有人遇到过相同的问题.我的意思是,对于这样的大型平台,连接数据库应该不是问题.或者我可能做错了什么.谢谢
Has someone experienced the same problem before. I mean connecting to a database shouldn't be a problem for a big platform like this. Or I am probably doing something wrong. Thanks
版本:Airflow v1.7.0,Oracle11g
Version: Airflow v1.7.0, Oracle11g
我使用的主机名与在Oracle SQLDeveloper客户端中使用的主机名相同:
I am using the same hostname which I use in Oracle SQLDeveloper client:
推荐答案在研究了源代码之后,这终于对我起作用了:
After digging into the source code, this is what finally how it worked for me:
Conn类型:Oracle
Conn Type: Oracle
主机:example
Host: example
模式:用户名
登录:用户名
端口:端口号
额外:{"sid":我的sid","dsn":"example"}
extra: {"sid": "my sid", "dsn": "example"}
更多推荐
如何将Airflow连接到Oracle数据库
发布评论