· 6 years ago · Jun 25, 2019, 05:16 PM
1CREATE EXTERNAL TABLE IF NOT EXISTS default.invoice (
2 `cust_id` string,
3 `invoice_id` string,
4 `dated` string,
5 `from` string,
6 `to` string,
7 `amount` decimal,
8 `sgst` decimal,
9 `total_amount` decimal,
10 `amt_words` string
11)
12ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
13WITH SERDEPROPERTIES (
14 'serialization.format' = ',',
15 'field.delim' = ','
16) LOCATION 's3://snt-csv/'
17TBLPROPERTIES ('has_encrypted_data'='false');