How do you output processed JSON from AWS Glue to DynamoDB?

Viewed 237
        {
            "adult": false,
            "backdrop_path": "/example.jpg",
            "belongs_to_collection": null,
            "budget": 350000,
            "genres": [
                {
                    "id": 18,
                    "name": "Drama"
                }
            ],
            "homepage": "",
            "id": 123,
            "imdb_id": "a3f4w4f4",
            "original_language": "en",
            "overview": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum",
            "popularity": 27.298,
            "poster_path": "/example.jpg",
            "production_companies": [
                {
                    "id": 60,
                    "logo_path": "/example.png",
                    "name": "example 1",
                    "origin_country": "US"
                },
                {
                    "id": 10212,
                    "logo_path": null,
                    "name": "example 2",
                    "origin_country": ""
                }
            ],
            "production_countries": [
                {
                    "iso_3166_1": "US",
                    "name": "United States of America"
                }
            ],
            "release_date": "1970-04-10",
            "revenue": 1000000,
            "runtime": 97,
            "spoken_languages": [
                {
                    "iso_639_1": "en",
                    "name": "English"
                }
            ],
            "status": "Released",
            "tagline": "Lorem ipsum.",
            "title": "Example name",
            "video": false,
            "vote_average": 8.5,
            "vote_count": 5004
        }

I am new to AWS Glue. From what I know it creates a zeppelin notebook that flattens json you throw at it using relationalize transform. Then it normally allows writing to RDS/s3 etc.

I didnt find any good information on directly exporting to dynamodb from AWS glue. Above is one of the json items in a collection I want to store in dynamodb.

The json fields and keys are identical and consistent with the other json items, albeit some have fewer or more subitems.

If the dynamodb table and schema exists, -- you can assume each json key maps to a dynamo column -- I want AWS Glue to insert or update this json information into dynamo.

How do I do that? Can AWS Glue recreate a dynamo schema? I want to automate as much as possible

0 Answers
Related