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

질문됨 5달 전316회 조회
1개 답변
0
profile pictureAWS
전문가
답변함 5달 전
profile picture
전문가
검토됨 한 달 전

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

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

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