-- Creates a table covering the macie output for a single macie job. Delete this comment line before running in athena console. CREATE EXTERNAL TABLE `maciedetail_job_REPLACE-JOB-ID`( `accountid` string, `category` string, `classificationdetails` struct,sizeclassified:string,mimetype:string,sensitivedata:array>,pages:array>,records:array>,cells:array>>>>>>,customdataidentifiers:struct>,pages:array,records:array,cells:array>>>>>,detailedresultslocation:string,jobid:string,originType:string>, `createdat` string, `description` string, `id` string, `partition` string, `region` string, `resourcesaffected` struct,tags:array,defaultserversideencryption:struct,publicaccess:struct,bucketpolicy:struct,blockpublicaccess:struct>,accountlevelpermissions:struct>>,effectivepermission:string>>,s3object:struct,size:string,storageclass:string,tags:array,embeddedfiledetails:struct,publicaccess:boolean>>, `schemaversion` string, `severity` struct, `title` string, `type` string, `updatedat` string) ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe' WITH SERDEPROPERTIES ( 'paths'='accountId,category,classificationDetails,createdAt,description,id,partition,region,resourcesAffected,schemaVersion,severity,title,type,updatedAt') STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION 's3://REPLACE-RESULTS-BUCKET-NAME/AWSLogs/REPLACE-ACCOUNT-ID/Macie/REPLACE-REGION/REPLACE-JOB-ID'