I want to load a table with input data into hive. I have data in the following format.
\"153662\";\"0002241447\";\"0\"
\"153662\";\"000647036X\";\"0\"
\"153
Multiple ways to achieve this:
"\"(.*)\"\;\"(.*)\"\;\"(.*)\""CREATE EXTERNAL TABLE source( a string, b String, c String) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\;' LOCATION 'xyz';
CREATE TABLE destination AS SELECT REGEXP_REPLACE(a,'"',''), REGEXP_REPLACE(b,'"',''), CAST ( REGEXP_REPLACE(c,'"','') AS BIGINT) FROM source;