Getting Data In

How can I index data from a CSV file with 2 header lines

dajomas
Path Finder

Hi all,

I have CSV files  (they are exports from the Garmin R10 launch monitor session data via the Garmin Golf app) that contain 2 header lines, the first header line contains the field names and the second header line contains the unit of measurement (or blank if not applicable)

For example:

Date,Player,Club Name,Club Type,Club Speed,Attack Angle,...
,,,,[mph],[deg],...
09/10/23 10:00:45 AM,Johan,7 Iron,7 Iron,70.30108663634557,-7.360383987426758,...

 

Now, I would like to index the data in one of 2 ways:

  1. Add the unit of measurement to the value
    1. so that would become "70.30108663634557mph" for the Club Speed field
  2. Add an additional column that contains the unit of measurement
    1. Add column "Club Speed UOM" with value mph for every line indexed from the CSV file and do this for every column that contains a valid unit of measurement

For me, option 2 would be the preferred option

A third option, would be to skip the unit of measurement line altogether but I would rather not use this option.

 

I would appreciate any help that points me in the right direction to solve this challenge.

 

Thanx in advance.

Labels (1)
Tags (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I would write a script that converts the CSV into K=V format and run it as a scripted input.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...