来自AWS Glue的Oracle jdbc连接中的错误

时间:2020-11-11 16:53:28

标签: oracle pyspark aws-glue oracle9i

我有一个Oracle DB坐在我们办公室的某些服务器中。它有Oracle 9i version

我正在尝试从AWS Glue建立连接以连接到我的数据库。我添加了ojdbc14.jar作为连接到Oracle 9i的依赖项。

这是我的胶水代码:

import sys
import boto3
import json
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.dynamicframe import DynamicFrame
from awsglue.job import Job


## @params: [JOB_NAME]
args = getResolvedOptions(sys.argv, ['JOB_NAME'])

sc = SparkContext()
glueContext = GlueContext(sc)
spark = glueContext.spark_session
job = Job(glueContext)
job.init(args['JOB_NAME'], args)

connection_oracle9_options = {
    "url": "jdbc:oracle:thin:@//ip-address-of-db:1521/JDAPROD",
    "dbtable": "ALDO.FT_BP_STRMO",
    "user": "BI_READ",
    "password": "SUN2DAY",
    "customJdbcDriverS3Path": "s3://raw/Dependencies/ojdbc14.jar",
    "customJdbcDriverClassName": "oracle.jdbc.OracleDriver"}
    
df_oracle11 = glueContext.create_dynamic_frame.from_options(connection_type="oracle", connection_options=connection_oracle9_options)
df_oracle11.show()

                                                            

job.commit()

这给了我以下JDBC错误: enter image description here

我想念什么吗?

0 个答案:

没有答案