Getting Data In

CSV field header/label based on a value in column.

nikorc
Loves-to-Learn Lots

So I have a csv file that is generated while a program runs. The 1st 4 columns are same headers. DATE,TIME, LOCATION,EVENT. After this there can be 4-8 more fields with unique headers on what the event field is equal to.

For example if the event = 1 then the field and headers would be. DATE,TIME, LOCATION,EVENT,speed,tilt

For example if the event = 2 then the field and headers would be. DATE,TIME, LOCATION,EVENT,altitude,latitude,longitude.

I am not fully sure how to get this data in with the proper field headers.

example:
2020/03/03,13:40:23,Ohio,1,200,30
2020/03/03,13:40:23,Ohio,2,33000,40.4173,82.9071

Tags (1)
0 Karma

to4kawa
Ultra Champion

`INGEST_EVAL` makes new fields and existed fileds null.

0 Karma

nikorc
Loves-to-Learn Lots

Thank you so much! This is exactly what I was looking for.

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...