Input stream.
{
“awsRegion”: “us-west-2”,
“eventID”: “101”,
“eventName”: “TEST”,
“userIdentity”: null,
“recordFormat”: “application/json”,
“tableName”: “TEST_dev”,
“dynamodb”: {
“ApproximateCreationDateTime”: 1714401906352737,
“Keys”: {
“ID”: {
“S”: “TEST_1”
}
},
“NewImage”: {
“ID”: {
“S”: “TEST_1”
},
“urlDetails”: {
“L”: [
{
“M”: {
“type”: {
“S”: “Hello”
},
“url”: {
“S”: “Hello.com”
}
}
},
{
“M”: {
“type”: {
“S”: “HI”
},
“url”: {
“S”: “HI.com”
}
}
},
{
“M”: {
“type”: {
“S”: “TESTING”
},
“url”: {
“S”: “TESTING.com”
}
}
}
]
}
},
“SizeBytes”: 427,
“ApproximateCreationDateTimePrecision”: “MICROSECOND”
},
“eventSource”: “aws:dynamodb”
}
I have created the view and parsing the individual fields .like below
select data.dynamodb.”NewImage”.”ID”.”S”::varchar(255) as ID from view;
Similarly I am looking to parse urlDetails field also.
Expected output for urlDetails field;
[
{
“type”: “Hello”,
“url”: “Hello.com”
},
{
“type”: “Hi”,
“url”: “Hi.com”
},
{
“type”: “TESTING”,
“url”: “TESTING.com”
}
]
I tried select data.dynamodb.”NewImage”.”urlDetails”.”L”.”M”.”type”.”S” as url from view;
But its showing NULL