Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Creating Table in Athena from json file :FAILED: ParseException line 6:10 missing : at 'struct' near '<EOF>'

Highlighted

Creating Table in Athena from json file :FAILED: ParseException line 6:10 missing : at 'struct' near '<EOF>'

New Contributor

I am creating a table in Athena with below json file, getting an error FAILED: ParseException line 6:10 missing : at 'struct' near '<EOF>'. Is there any syntax issue , is the sql statement correct ?

 

{
"Contents": [
{
"LastModified": "2019-08-27T16:35:07.000Z",
"ETag": "\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"",
"StorageClass": "STANDARD",
"Key": "/p-beanstalk-s3/ABDS//enba2608.csv",
"Owner": {
"DisplayName": "AWS-ABCD-MGMT-PROD",
"ID": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"Size": 108914
},
]
}

-------------------------------

CREATE EXTERNAL TABLE p_lvlft (
Contents array<struct<`LastModified`: timestamp,
ETag: string,
StorageClass: string,
Key: string,
Owner struct<`displayname`: string, id: string>,
Size: int>>
)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ('ignore.malformed.json' = 'true')
LOCATION 's3://p-ABCD-beanstalk-s3-object-details/AthenaFolder'

Don't have an account?
Coming from Hortonworks? Activate your account here