Skip to content
Advertisement

Selecting string after the last \ using regex with Impala SQL

I have a dataset with a column with processes and the path. I am trying to use regex with Impala to strip off the executable. The dataset looks like this:

Desired output:

I have tried many queries like the two below but keep running into errors

Error:

Error:

Looking for some guidance from anyone that is good with impala or regex.

Advertisement

Answer

Not being a regex expert, I am sure there is a better way but this does the work

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement