Skip to content

Instantly share code, notes, and snippets.

@ogrodnek
Created June 15, 2012 00:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ogrodnek/2933779 to your computer and use it in GitHub Desktop.
Save ogrodnek/2933779 to your computer and use it in GitHub Desktop.
AWS Billing hive schema
create external table aws_billing(
InvoiceId string,
PayerAccountId string,
LinkedAccountId string,
RecordType string,
RecordID int,
BillingPeriodStartDate string,
BillingPeriodEndDate string,
InvoiceDate string,
PayerAccountName string,
LinkedAccountName string,
TaxationAddress string,
PayerPONumber string,
ProductCode string,
ProductName string,
SellerOfRecord string,
UsageType string,
Operation string,
RateId int,
ItemDescription string,
UsageStartDate string,
UsageEndDate string,
UsageQuantity double,
BlendedRate string,
CurrencyCode string,
CostBeforeTax double,
Credits double,
TaxAmount double,
TaxType string,
TotalCost double
)
partitioned by (year string, month string)
row format serde 'com.bizo.hive.serde.csv.CSVSerde'
stored as textfile
location "s3://${awsBillingBucket}/partitioned/"
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment