I have stored the Amazon Connect agent records and CTR records in same data stream and using firehose loaded into an S3 where I am finding issues to read the data using Athena, I used AWS Glue Crawler to generate a schema. The issue is at:
The data generated has the following attributes:
"SegmentAttributes": {
"connect:Subtype": {
"ValueString": "connect:Telephony"
}
},
"SystemEndpoint": {
"Address": "+1xxxxxxxxxx",
"Type": "TELEPHONE_NUMBER"
},
"Tags": {
"aws:connect:instanceId": "0xxxxxaavv-78xxxxxb569",
"aws:connect:systemEndpoint": "+1xxxxxxxxxx"
},
The crawler has generated the schema and for this block it looks like:
{
"Name": "segmentattributes",
"Type": "struct<connect\:Subtype:struct<ValueString:string>>"
},
{
"Name": "systemendpoint",
"Type": "struct<Address:string,Type:string>"
},
{
"Name": "tags",
"Type": "struct<aws\:connect\:instanceId:string,aws\:connect\:systemEndpoint:string>"
},
While I run the table I get this error:
HIVE_INVALID_METADATA: Glue table 'ktxxxxxxgxxt.coxxxxxv_bnbn' column 'segmentattributes' has invalid data type: struct<connect:Subtype:struct<ValueString:string>>
How to solve this issue?