How do I install SQL Server Drivers on a AWS Glue Python Shell Job

0

Context: I want to execute an AWS Glue Python Shell job which can connect to an external SQL server DB using the 'pyodbc' library.

Hi everyone,

I'm trying to figure out a way to connect to an external SQL server DB inside a Glue Python Shell job and I'm unable to install the SQL Server Drivers correctly (Reference: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017&tabs=redhat18-install%2Credhat17-install%2Credhat7-install%2Credhat7-13-install%2Crhel7-offline#17)

Since AWS Glue Python Shell jobs spin up a temporary instance/machine, I want the job to install the drivers every time it is run so that it can access the DB using my Python script.

How do I achieve this? I've tried using the 'subprocess' library in Python to execute shell commands on the temporary job instance but I'm facing issues such as 'sudo not found'.

Thanks, Abhishek

posta 5 mesi fa316 visualizzazioni
1 Risposta
0
profile pictureAWS
ESPERTO
con risposta 5 mesi fa
profile picture
ESPERTO
verificato un mese 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