Last active
February 11, 2019 11:31
-
-
Save chhantyal/38662a527fa9ac7bb5a09af3bebed660 to your computer and use it in GitHub Desktop.
Hive create external table from CSV file with semicolon as delimiter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Semicolon (;) is used as query completion in Hive */ | |
/* Thus, using TERMINATED BY ";" will not work. This is workaround to that limitation */ | |
CREATE EXTERNAL TABLE tablename | |
(`col1` string, `col2` string) | |
ROW FORMAT DELIMITED FIELDS TERMINATED BY "\u003B" STORED AS TEXTFILE | |
LOCATION "<location>" | |
TBLPROPERTIES("skip.header.line.count"="1"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
useful