AWS Glue job updating an existing table

0

Using AWS Glue jobs, I want to insert, update and delete the rows in a Table in RDS Database based on the primary key. How do I achieve it.

질문됨 2년 전4713회 조회
2개 답변
0

There are multiple ways one of them is -

1- Use Glue python shell job , copy the jdbc jar on S3 and refer then by initializing connection object and execute the SQL statement. similar :- https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html

2- Create Mysql connection in AWS glue use connection object in Glue python shell job type in Glue studio or legacy ETL and follow step 1.

Other reference :- https://aws.amazon.com/blogs/big-data/building-aws-glue-spark-etl-jobs-by-bringing-your-own-jdbc-drivers-for-amazon-rds/

AWS
NishAWS
답변함 2년 전
0

This web site may help you.

https://medium.com/@thomaspt748/how-to-upsert-data-into-a-relational-database-using-apache-spark-part-1-python-version-b43b9761bbf2

I have created jobs to execute update, insert or delete sql statement on Oracle database on Amazon RDS by using JayDeBeApi, JPype or cx_oracle(if you use MySQL, then you may use mysql connector) libraries.

답변함 일 년 전

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

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

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

관련 콘텐츠