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.

질문됨 일 년 전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
지원 엔지니어
답변함 일 년 전
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
지원 엔지니어
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠