'How Create a hive external table with parquet format

I am trying to create an external table in hive with the following query in HDFS.

CREATE EXTERNAL TABLE `post` (
    FileSK STRING,
    OriginalSK STRING,
    FileStatus STRING,
    TransactionType STRING,
    TransactionDate STRING
   )
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
  STORED AS PARQUET TBLPROPERTIES("Parquet.compression"="SNAPPY")
  LOCATION 'hdfs://.../post'

getting error

Error while compiling statement: FAILED: ParseException line 11:2 missing EOF at 'LOCATION' near ')'

What is the best way to create a HIVE external table with data stored in parquet format?



Solution 1:[1]

I am able to create table after removing property TBLPROPERTIES("Parquet.compression"="SNAPPY")

CREATE EXTERNAL TABLE `post` (
    FileSK STRING,
    OriginalSK STRING,
    FileStatus STRING,
    TransactionType STRING,
    TransactionDate STRING
   )
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
  STORED AS PARQUET,
  LOCATION 'hdfs://.../post'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Midhun Pottammal