Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE xmlload(user_id STRING,
- song_id BIGINT, artist_id STRING,
- timestamp STRING, start_ts String,
- end_ts String, geo_cd String, station_id String
- song_end_type String, like int. dislike int)
- ROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe'
- WITH SERDEPROPERTIES (
- "column.xpath.user_id"="/record/user_id/text()",
- "column.xpath.seller_rating"="/listing/seller_info/seller_rating/text()",
- "column.xpath.bidder_name"="/listing/auction_info/high_bidder/bidder_name/text()",
- "column.xpath.location"="/listing/auction_info/location/text()",
- "column.xpath.bid_history"="/listing/bid_history/*",
- "column.xpath.item_info"="/listing/item_info/*"
- )
- STORED AS
- INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'
- OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'
- TBLPROPERTIES (
- "xmlinput.start"="<listing>",
- "xmlinput.end"="</listing>"
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement