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
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则