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.

posta un anno fa230 visualizzazioni
2 Risposte
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
TECNICO DI SUPPORTO
con risposta un anno fa
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
TECNICO DI SUPPORTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande