Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Trying to EXTRACT_TOKEN on multiple lines

$
0
0

Hi,

My select query looks something like this:

SELECT EXTRACT_TOKEN(Text, 0, 'INFO') AS Time, 
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 0, '|'),1,'ReadConfiguration') AS ReadConfiguration, 
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 1, 'PolygonAggregation'),0,'|') AS PolygonAggregation, 
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 1, 'SelectByLocation'),0,'|') AS SelectByLocation,
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 1, 'SelectBySQL'),0,'|') AS SelectBySQL, 
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 1, 'Deduplicate'),0,'|') AS Deduplicate,
EXTRACT_TOKEN(EXTRACT_TOKEN(Text, 1, 'DistanceCalculation'),0,'|') AS DistanceCalculation
INTO SocLogExample.tsv
FROM Perf1\*.log,Perf2\*.log,Perf3\*.log,Perf4\*.log
Where Text like '%INFO%ReadConfiguration%'

Now this works fine for the logs that stay on one line but many of the longer logs that I'm parsing are over multiple lines. (With EoL characters, not just wrapped).

Is there a way to parse through a log say from one timestamp until another and ignoring end lines?


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>