Splunk Search

How to make a field extraction for my sample data?

ewise1
New Member

I want to make a field extraction by the name of Action to show this whole text ,'update ggsourceadmin.monitor set ORACLE_TIME = CURRENT_TIMESTAMP WHERE TABLE_PK = 1',; how should I extract?

0 Karma

woodcock
Esteemed Legend

You need to show us the entire raw event.

0 Karma

DalJeanis
Legend

You would have to show us the surrounding text, or examples of different versions, for us to know what to focus on in building the regex.

One thing that I would check on is whether that whole SQL statement ended in a semicolon. If so, that makes it pretty easy to know when to stop. Assuming there is one, then this rex would do it.

| rex "(i)(?update [^;]+;)"

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...