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.

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南