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
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...