Created 04-12-2022 03:46 PM
Here is the code.
create external table testtable1
(code string, codesystem string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
"input.regex" = "(.{27)(.{50})"
)
LOCATION '/data/raw/testtable1';
The error message is:
ParseException: Syntax error in line 3:undefined: ROW FORMAT SERDE 'org.apache.hadoop.hiv... ^ Encountered: IDENTIFIER Expected: DELIMITED CAUSED BY: Exception: Syntax error
It looks like Impala table only accepts "Row Format Delimited".
Then how can I create an hive table with fixed width layout? Should I just do it outside Impala, bu through Hive, and then do other data operation on this table via Impala?
Thanks.
Created 04-13-2022 02:36 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 04-13-2022 02:36 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 04-14-2022 10:42 AM
@mszurap Thanks for the response. I actually took the 2nd option you mentioned - ingesting it into a table which has only a single (string) column. But I am not sure whether it is the right approach. I appreciate the confirmation.
Regards,