Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Error while Creating Hive table with Serde using thiverow

Hi, I want to run the below query using thiverow, 
Talend Open Studio for Big Data 6.3.1 & CDH 5.8
CREATE EXTERNAL TABLE intermediate_access_logs (
ip STRING,
date STRING,
method STRING,
url STRING,
http_version STRING,
code1 STRING,
code2 STRING,
dash STRING,
user_agent STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
'input.regex' = '([^ ]*) - - \\[([^\\]]*)\\] "([^\ ]*) ([^\ ]*) ([^\ ]*)" (\\d*) (\\d*) "([^"]*)" "([^"]*)"',
'output.format.string' = "%1$$s %2$$s %3$$s %4$$s %5$$s %6$$s %7$$s %8$$s %9$$s")
LOCATION '/user/hive/warehouse/original_access_logs';

Iam getting an error when I run this.

Am I missing something ? should I add any jar ?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Fixed the issue by escaping double quotes ('"' to '\"') and back slashes ("\" to "\\" and "\\" to "\\\\")

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Fixed the issue by escaping double quotes ('"' to '\"') and back slashes ("\" to "\\" and "\\" to "\\\\")