Skip to content

Instantly share code, notes, and snippets.

@alessandrobologna
Created May 27, 2019 19:54
Show Gist options
  • Save alessandrobologna/b8e5e5ec5255b4da75ab1ec884860295 to your computer and use it in GitHub Desktop.
Save alessandrobologna/b8e5e5ec5255b4da75ab1ec884860295 to your computer and use it in GitHub Desktop.
CREATE EXTERNAL TABLE `ticker_symbols`(
`ticker_symbol` string,
`sector` string,
`change` double,
`price` double,
`firehose` struct<record_id:string,timestamp:bigint>
)
PARTITIONED BY (
`year` string,
`month` string,
`day` string,
`hour` string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS
INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION 's3://stream-o-matic.data.dev/tables/ticker_symbols'
TBLPROPERTIES (
'firehose_automation'='true',
'firehose_buffering_mb'='64',
'firehose_buffering_seconds'='60'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment