<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data Enrichment from lookup with column header containing spaces in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315721#M94500</link>
    <description>&lt;P&gt;So where was the breakdown in your first attempt?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 13:00:56 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-04-10T13:00:56Z</dc:date>
    <item>
      <title>Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315714#M94493</link>
      <description>&lt;P&gt;Is it possible to use a csv file in a lookup specifically for data enrichment whereby the column header contains spaces?&lt;/P&gt;

&lt;P&gt;I'm trying to make the process of delivering a csv to us as painless as possible, so I dont really want to force the owner to have to edit the header to remove the spaces.&lt;/P&gt;

&lt;P&gt;I've tried using quotes but this just errors;&lt;/P&gt;

&lt;P&gt;my search| lookup myfile.csv Employee AS user OUTPUT "Employee ID"&lt;/P&gt;

&lt;P&gt;Any ideas? Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315714#M94493</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-07T15:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315715#M94494</link>
      <description>&lt;P&gt;Just to verify... "Employee" and "Employee ID" are two different columns in the csv?&lt;/P&gt;

&lt;P&gt;If so, then take a look at the csv using a plain text editor, and verify the exact spelling and capitalization of the user column "Employee"  Make sure there's no space before or after the word.  Go ahead and put it in quotes in the lookup command.  Also, you can save yourself some trouble later if you go ahead and jerk that space out of the field name right here...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search| lookup myfile.csv "Employee" AS user OUTPUT "Employee ID" AS EmployeeID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315715#M94494</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-07T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315716#M94495</link>
      <description>&lt;P&gt;yes, 2 different columns. The search for Employee against the user field works fine. The problem is after the OUTPUT where that column contains the space between Employee and ID. I need to use the data in that column for data enrichment purposes. &lt;/P&gt;

&lt;P&gt;If I remove the space, it works perfectly, but I'd have though the quotes would work and allow me to keep the sapce in place in the lookup. If that makes sense.&lt;/P&gt;

&lt;P&gt;I tried your version ie OUTPUT "Employee ID" AS EmployeeID, but it errors.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315716#M94495</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-07T16:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315717#M94496</link>
      <description>&lt;P&gt;Run this and tell us the field names that Splunk returns.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup myfile.csv  | table Employee*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315717#M94496</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-07T16:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315718#M94497</link>
      <description>&lt;P&gt;What error are you getting? In my testing, I was able to output field names containing spaces from the lookup using double quotes in the lookup command. Without seeing sample data from your events, or from the lookup, as far as I can tell, the syntax you are using should work.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 23:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315718#M94497</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2017-04-07T23:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315719#M94498</link>
      <description>&lt;P&gt;Do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup myfile.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Examine the format of the field names and the output.  Identify one &lt;CODE&gt;Employee&lt;/CODE&gt; value to use as a test (e.g. &lt;CODE&gt;gwoodcock&lt;/CODE&gt;) and then do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults | eval user = "gwoodcock" | lookup myfile.csv Employee AS user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should get ALL of the fields as output.  Then try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults | eval user = "gwoodcock" | lookup myfile.csv Employee AS user OUTPUT "Employee ID"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tested this and it works.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2017 15:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315719#M94498</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-08T15:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315720#M94499</link>
      <description>&lt;P&gt;Thanks, wasn't familiar with the 'makeresults' command, pretty sure that could come in handy in future as well so cheers, appreciate that.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 08:29:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315720#M94499</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-10T08:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315721#M94500</link>
      <description>&lt;P&gt;So where was the breakdown in your first attempt?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315721#M94500</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-10T13:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data Enrichment from lookup with column header containing spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315722#M94501</link>
      <description>&lt;P&gt;Still not sure to be honest. I think that because it was failing was causing me to question whether or not it was possible. The fact it was confirmed that it should work, in conjunction with your syntax and the use of the makeresults command for testing purposes allowed me to get it working in the end. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 15:04:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-Enrichment-from-lookup-with-column-header-containing-spaces/m-p/315722#M94501</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-10T15:04:32Z</dc:date>
    </item>
  </channel>
</rss>

