Getting Data In

How to remove spaces from CSV column names to get data into a pivot table?

cdstealer
Contributor

Hi,

I'm trying to ingest some CSV files that contain QOS metrics. The issue I have is that I need to get this data into a pivot table which stops and complains of the spaces. Now when I add the extracted attributes, I do have the options to rename each field name. Not an ideal solution if the CSV contains 100+ columns 😞

I've tried defining the SEDCMD "SEDCMD = 's/ //g'" command in props.conf but this had no effect. Has anyone come across this and auto removed the spaces?

eg:
CLASS_MRR_Backup - Throughput (I/O/sec)

So when "Add Auto-Extracted Field", I get the error "Field Name can not contain whitespace, double quotes, single quotes, curly braces or asterisks." even if I use the rename option.

Cheers
Steve

Tags (4)
0 Karma

sundareshr
Legend

sedcmd will not work with Indexed Extractions. Remove the indexed extraction=csv from your props and extract using DELIMs. You will now be able to use SEDCMD to replace spaces with underscore (or whatever)

gpareesi11
Path Finder

I have exactly the same issue, I working to fix it, but if you have found a solution please post the answer.

Thanks

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...