-- creates a table covering the macie output for all macie jobs. Delete this comment line before running in athena console. CREATE EXTERNAL TABLE maciedetail_all_jobs( 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/'