<?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 How to use inputlookup with csv file to import two multi value fields in a search? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160749#M32587</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I try to use inputlookup with a csv file to import two multi value fields in a search.&lt;BR /&gt;
The two fields are both filled with numbers seperated with "," like 0012345678101112,5.&lt;BR /&gt;
The field names are tickets and days.&lt;BR /&gt;
Now I try to compare another field(Tickets)with the tickets field.&lt;BR /&gt;
The problem is now that when I compare the 2 fields there are no accordances. I also tried to convert the fields to String and to Numbers but that didn't help either.&lt;BR /&gt;&lt;BR /&gt;
The code looks like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mainsearch...&lt;BR /&gt;
|append[|inputlookup input.csv]&lt;BR /&gt;
|eval tickets = toNumber(tickets)&lt;BR /&gt;
|where Tickets == tickets&lt;BR /&gt;
|stats dc(Tickets)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Tickets is typeof Number so it should work.&lt;BR /&gt;
Where is the error?&lt;BR /&gt;
Greetings&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jul 2014 08:01:46 GMT</pubDate>
    <dc:creator>C_Sparn</dc:creator>
    <dc:date>2014-07-29T08:01:46Z</dc:date>
    <item>
      <title>How to use inputlookup with csv file to import two multi value fields in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160749#M32587</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I try to use inputlookup with a csv file to import two multi value fields in a search.&lt;BR /&gt;
The two fields are both filled with numbers seperated with "," like 0012345678101112,5.&lt;BR /&gt;
The field names are tickets and days.&lt;BR /&gt;
Now I try to compare another field(Tickets)with the tickets field.&lt;BR /&gt;
The problem is now that when I compare the 2 fields there are no accordances. I also tried to convert the fields to String and to Numbers but that didn't help either.&lt;BR /&gt;&lt;BR /&gt;
The code looks like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mainsearch...&lt;BR /&gt;
|append[|inputlookup input.csv]&lt;BR /&gt;
|eval tickets = toNumber(tickets)&lt;BR /&gt;
|where Tickets == tickets&lt;BR /&gt;
|stats dc(Tickets)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Tickets is typeof Number so it should work.&lt;BR /&gt;
Where is the error?&lt;BR /&gt;
Greetings&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 08:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160749#M32587</guid>
      <dc:creator>C_Sparn</dc:creator>
      <dc:date>2014-07-29T08:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup with csv file to import two multi value fields in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160750#M32588</link>
      <description>&lt;P&gt;I tried this and it worked.&lt;/P&gt;

&lt;P&gt;I created test1.csv with two columns Ticket and Days&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Base Search | stats count as Count by TicketCode | appendcols [|inputlookup test1.csv] | where TicketCode == Ticket | stats dc(TicketCode)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above works when the field values are in same order.&lt;/P&gt;

&lt;P&gt;You may try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Base search | stats count as Count by TicketCode | rename TicketCode as Ticket| join Ticket[|inputlookup test1.csv] | stats dc(Ticket) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Jul 2014 08:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160750#M32588</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-29T08:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup with csv file to import two multi value fields in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160751#M32589</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
thanks for the answer, but both solutions are not working for me. With appendcols I get a table with each one ticket and one day value. But it is not the right day value like in the csv file. Join just gives no results. Also the where clause after appendcols gives no results in my search.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 10:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160751#M32589</guid>
      <dc:creator>C_Sparn</dc:creator>
      <dc:date>2014-07-29T10:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup with csv file to import two multi value fields in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160752#M32590</link>
      <description>&lt;P&gt;What do your events and your lookup file look like?&lt;BR /&gt;
What does the desired result look like?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 11:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160752#M32590</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-29T11:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup with csv file to import two multi value fields in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160753#M32591</link>
      <description>&lt;P&gt;I found a solution with testing your code:&lt;BR /&gt;
My solustion looks like this:&lt;/P&gt;

&lt;P&gt;Base search | rename TicketCode as Ticket| join Ticket[|inputlookup test1.csv|rename tickets as Tickets] &lt;BR /&gt;
|stats dc(Ticket) &lt;/P&gt;

&lt;P&gt;Then the join is correct and I can use all other fields of the csv file in the main search.&lt;BR /&gt;
Thanks for the answers.&lt;/P&gt;

&lt;P&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 12:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-with-csv-file-to-import-two-multi-value/m-p/160753#M32591</guid>
      <dc:creator>C_Sparn</dc:creator>
      <dc:date>2014-07-30T12:40:12Z</dc:date>
    </item>
  </channel>
</rss>

