Getting Data In

Why is there a problem parsing empty CSV file which only contain a header?

danje57
Path Finder

Hi,

I receive log file from my servers.

All files are CSVs.

CSVs which contain header + data are well parsed.
However, CSV which are empty an contain only the header following with nothing are not parsed correctly.

Indeed, when empty file are parsed, Splunk parses the headers of the CSV as data.

This is not the bahavior I want.

When I configure the source, I checked to ignore the first line as the first line is always the header.

Do you have any suggestion?

[csv_ad]
DATETIME_CONFIG =
HEADER_FIELD_LINE_NUMBER = 1
INDEXED_EXTRACTIONS = csv
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
description = Comma-separated value format. Set header and other settings in "Delimited Settings"
disabled = false
pulldown_type = true
TIMESTAMP_FIELDS =
0 Karma

adonio
Ultra Champion
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...