Getting Data In

ingest csv files containing multi line fields

gcusello
SplunkTrust
SplunkTrust

Hi at all,

I have to ingest a csv file where some fields are multivalue and multiline, something like this:

 

 

 

FIELD1;FIELD2;FIELD3;FIELD4;FIELD5
xxxx;yyyyy;"ppp
";"qqq
asd
asd
ert
www";qwerty

 

 

 

How can I do it? I tried in many ways but it fails everytime.

Ciao and Thanks.

Giuseppe

Labels (1)
Tags (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
I've done that in the past and, IIRC, it just worked. Can you share your props?
---
If this reply helps you, Karma would be appreciated.
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @richgalloway ,

thanks for your help.

this is my last props.conf, I used also other tries (e.g. listing fields instead HEADER_FIELD_LINE_NUMBER) but with the same result:

[my_sourcetype]
BREAK_ONLY_BEFORE_DATE = 
DATETIME_CONFIG = CURRENT
FIELD_DELIMITER = ;
FIELD_QUOTE = "
INDEXED_EXTRACTIONS = csv
KV_MODE = none
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
description = Processes
disabled = false
pulldown_type = 1
PREAMBLE_REGEX = ^XXX
HEADER_FIELD_LINE_NUMBER = 1

Ciao and thanks.

 Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This is what I get when I onboard your data with those settings.

richgalloway_0-1594388789041.png

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @richgalloway ,

when I try to ingest my logs I have an event for each row.

Maybe I could use SHOULD_LINEMERGE = true but I don't know how to divide events.

Ciao.

Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust
I suspect we're each doing something differently to get the different results, but I'm not sure what that something is.

Using SHOULD_LINEMERGE = true might help, but would break fields that are intended to have multiple lines. Then, as you say, there's the matter of how to break events properly.
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...