glueContext.extract_jdbc_conf() behaves inconsistently between Notebook and Script execution

0

Sample code (minus boilerplate):

conn = glueContext.extract_jdbc_conf(connection_name="My-Glue-Connection")

for i in conn.items:
    print(i)

Output from notebook:

('enforceSSL', 'false')
('skipCustomJDBCCertValidation', 'false')
('url', 'jdbc:sqlserver://0.0.0.0:1433')
('customJDBCCertString', '')
('user', 'test')
('customJDBCCert', '')
('password', 'xxx')
('vendor', 'sqlserver')

Output from running job:

**('fullUrl', 'jdbc:sqlserver://0.0.0.0:1433/mydb')**
('enforceSSL', 'false')
('skipCustomJDBCCertValidation', 'false')
('url', 'jdbc:sqlserver://0.0.0.0:1433')
('customJDBCCertString', '')
('user', 'test')
('customJDBCCert', '')
('password', 'xxx')
('vendor', 'sqlserver')

fullUrl (and thus the name of the database to connect to) is not available when using this method in a notebook.

已提问 1 年前230 查看次数
2 回答
0

Hello,

I understand that glueContext.extract_jdbc_conf() is behaving inconsistently between Notebook and Script execution.

From the document https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-pyspark-extensions-glue-context.html#aws-glue-api-crawler-pyspark-extensions-glue-context-extract_jdbc_conf I could see that extract_jdbc_conf() should return the fullUrl for JDBC.

Therefore, I also tested at my end and found that when executing the Glue Job script the extract_jdbc_conf() is returning the 'fullUrl' details but when I tested this in Notebook interactive session it did not return the 'fullUrl' details.

Hence this was leading to inconsistent behaviour and by not getting the fullUrl you could not get the database which needs to be connected.

Thank you for bringing this to our noticed. I have informed this issue to our internal team, but please note that I do not have a ETA on the fix for the same as we do not have visibility on the internal team's roadmap. If I hear any update on this from the internal team will update you on the same.

Having said that I would also like to apologize for any inconvenience this issue must have caused you.

AWS
支持工程师
已回答 1 年前
0

Hello,

I would like to update you that the issue has been resolved and extract_jdbc_conf() is returning the 'fullUrl' details in Notebook interactive session for Glue 3.0 as well.

AWS
支持工程师
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则