CREATE EXTERNAL TABLE IF NOT EXISTS billing (
  bill_bill_type STRING,
  bill_billing_entity STRING,
  bill_billing_period_end_date TIMESTAMP,
  bill_billing_period_start_date TIMESTAMP,
  bill_invoice_id STRING,
  bill_invoicing_entity STRING,
  bill_payer_account_id STRING,
  bill_payer_account_name STRING,
  cost_category MAP<STRING, STRING>,
  discount MAP<STRING, STRING>,
  discount_bundled_discount DOUBLE,
  discount_total_discount DOUBLE,
  identity_line_item_id STRING,
  identity_time_interval STRING,
  line_item_availability_zone STRING,
  line_item_blended_cost DOUBLE,
  line_item_blended_rate STRING,
  line_item_currency_code STRING,
  line_item_legal_entity STRING,
  line_item_line_item_description STRING,
  line_item_line_item_type STRING,
  line_item_net_unblended_cost DOUBLE,
  line_item_net_unblended_rate STRING,
  line_item_normalization_factor DOUBLE,
  line_item_normalized_usage_amount DOUBLE,
  line_item_operation STRING,
  line_item_product_code STRING,
  line_item_resource_id STRING,
  line_item_tax_type STRING,
  line_item_unblended_cost DOUBLE,
  line_item_unblended_rate STRING,
  line_item_usage_account_id STRING,
  line_item_usage_account_name STRING,
  line_item_usage_amount DOUBLE,
  line_item_usage_end_date TIMESTAMP,
  line_item_usage_start_date TIMESTAMP,
  line_item_usage_type STRING,
  pricing_currency STRING,
  pricing_lease_contract_length STRING,
  pricing_offering_class STRING,
  pricing_public_on_demand_cost DOUBLE,
  pricing_public_on_demand_rate STRING,
  pricing_purchase_option STRING,
  pricing_rate_code STRING,
  pricing_rate_id STRING,
  pricing_term STRING,
  pricing_unit STRING,
  product MAP<STRING, STRING>,
  product_region_code STRING,
  resource_tags MAP<STRING, STRING>
)
PARTITIONED BY (
  billing_period STRING
)
STORED AS PARQUET
LOCATION 's3://MYEXPORTBUCKET/path-to-data/'
TBLPROPERTIES ('parquet.compression'='SNAPPY');