使用 AWS re:Post 即表示您同意 AWS re:Post 使用條款

How to create/populate relational database in aws glue?

0

say i have couple of json files in s3, I would to set up a crawler or a glue job, such that i can create table in aws rds (mysql or postgre) , such that in table 1, it creates a autogenerated id and stores the user info and also creates a second table with a foreign key that is set to the id of the first table.

so far , i am able to create a glue job with a script that reads the data into dynamic frame via => glueContext.create_dynamic_frame function and write it to the database. but i'm not sure , if i read multiple files and create these two related tables at once.

table 1. id | first_name | last_name 1 | John | Doe 2 | Tom | green

Table 2 id | user_id | address 54 | 1 | 123 pine street

file 1.

{"first_name" : "John" , "last_name" : "Doe" }
{"first_Name" : "Tom" , ....}

file2.

{"Name" : "John Doe", "address" : "123 pine street" , ....}
{"Name": "Tom", .....}
已提問 7 個月前檢視次數 1574 次
1 個回答
0

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

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

回答問題指南