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", .....}
asked 20 days ago863 views
1 Answer
0
profile pictureAWS
EXPERT
SriniV
answered 20 days ago
profile picture
EXPERT
reviewed 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions