Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created January 19, 2022 07:37
Show Gist options
  • Save velotiotech/16385bb02d436252e0bcc845a2586a1a to your computer and use it in GitHub Desktop.
Save velotiotech/16385bb02d436252e0bcc845a2586a1a to your computer and use it in GitHub Desktop.
create table sparkLog
(
datedata string
,time string
,component string
,action string
)
row format serde 'org.apache.hadoop.hive.serde2.RegexSerDe'
with serdeproperties
(
"input.regex" = "([0-9]{2}/[0-9]{2}/[0-9]{2}) ([0-9]{2}:[0-9]{2}:[0-9]{2}) [a-zA-Z]* ([a-zA-Z0-9.]*): (.*)$",
"output.format.string" = "%1$s %2$s %3$s %4$s"
)
STORED AS TEXTFILE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment