Hi,
You didn't escape the ^ character at the end.
Try using this string instead: ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^
\[]*)\[([^ ]*)\]: \(([^ ]*)\) ([\^]*)

Daniel

On Thu, Oct 1, 2015 at 3:17 PM, IT CTO <goi....@gmail.com> wrote:

> Hi,
> I am trying to create a table with Regex SerDe but failing with no good
> reason:
> CREATE EXTERNAL TABLE syslog (
>   month STRING,
>   day STRING,
>   time STRING,
>   source STRING,
>   process STRING,
>   pid STRING,
>   uname STRING,
>   message STRING)
> COMMENT 'This is the syslog sample table'
> ROW FORMAT SERDE "org.apache.hadoop.hive.serde2.RegexSerDe"
> WITH SERDEPROPERTIES (
>   "input.regex" = "([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ \[]*)\[([^ ]*)\]:
> \(([^ ]*)\) ([^]*)"
> )
> STORED AS TEXTFILE
> LOCATION 'dfs://localhost:8020/data/flumeTest/flume-test-spoolDir';
>
> The regex iself works on regex tester so I don't understand why I am
> getting:
>
>  FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.DDLTask.
> java.util.regex.PatternSyntaxException: Unclosed character class near index
> 66
> ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ []*)[([^ ]*)]: (([^ ]*)) ([^]*)
>
> Any help?
> --
> Eran | "You don't need eyes to see, you need vision" (Faithless)
>

Reply via email to