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

feita há 5 meses316 visualizações
1 Resposta
0
profile pictureAWS
ESPECIALISTA
respondido há 5 meses
profile picture
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas