Skip to content

Instantly share code, notes, and snippets.

@buzzsurfr
Created July 30, 2018 12:03
Show Gist options
  • Save buzzsurfr/fabd354738b35a89af0516122c647e42 to your computer and use it in GitHub Desktop.
Save buzzsurfr/fabd354738b35a89af0516122c647e42 to your computer and use it in GitHub Desktop.
Amazon Athena DDL for SNS Delivery Status Logs
CREATE EXTERNAL TABLE IF NOT EXISTS sns_delivery_status_logs (
status string,
notification struct<
timestamp:string,
messageId:string>,
delivery struct<
statusCode:int,
dwellTimeMs:int,
token:string,
attempts:int,
providerResponse;string,
destination:string>
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
LOCATION 's3://your_log_bucket/prefix/';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment