<?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: I Have 2 csv Files Created with outputcsv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642900#M222664</link>
    <description>&lt;P&gt;Have you tried the &lt;FONT face="courier new,courier"&gt;inputcsv&lt;/FONT&gt; command?&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 18:14:37 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-05-10T18:14:37Z</dc:date>
    <item>
      <title>How would I search what records are in the larger of 2 csv Files Created with outputcsv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642852#M222648</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have 2 csv files created using &lt;STRONG&gt;outputcsv&lt;/STRONG&gt;. Because of their size (500K records +) AND because they are really data sources and not true lookups (requiring bundle replication) &lt;STRONG&gt;outputcsv&lt;/STRONG&gt; and not &lt;STRONG&gt;outputlookup&lt;/STRONG&gt; was used. The issue of having is how to find what records are in the larger of the csv files. If these were generated with &lt;STRONG&gt;outputlookup&lt;/STRONG&gt;, no problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup csv1
| lookup csv2 field2 as field1 output field2a
| where isnull(field2a)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, with &lt;STRONG&gt;outputcsv&lt;/STRONG&gt; files, Splunk doesn't know the csv is &lt;EM&gt;NOT&lt;/EM&gt; in the app/lookups folder. *There should be a way to override the default location within the SPL.&lt;/P&gt;
&lt;P&gt;Thanks and God bless,&lt;BR /&gt;Genesius&lt;/P&gt;
&lt;P&gt;Edited: 500&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;K&lt;/STRONG&gt;&lt;/FONT&gt;+ records each. Not 500 each. This is why have to use the &lt;STRONG&gt;| outputcsv&lt;/STRONG&gt; command.&lt;BR /&gt;The&lt;STRONG&gt; | outputlookup&lt;/STRONG&gt; command will create very large bundles on the indexer.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 02:04:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642852#M222648</guid>
      <dc:creator>genesiusj</dc:creator>
      <dc:date>2023-05-11T02:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642900#M222664</link>
      <description>&lt;P&gt;Have you tried the &lt;FONT face="courier new,courier"&gt;inputcsv&lt;/FONT&gt; command?&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 18:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642900#M222664</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-05-10T18:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642903#M222666</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A lookup file created using the &lt;STRONG&gt;| outputcsv&lt;/STRONG&gt; command is not &lt;EM&gt;accessible&lt;/EM&gt; to the &lt;STRONG&gt;| lookup&lt;/STRONG&gt; command. Unless I missed it somewhere, when the&amp;nbsp;&lt;STRONG&gt;| lookup&lt;/STRONG&gt; command is run, Splunk looks for the whatever.csv file in the current applications lookups folder.&lt;/P&gt;&lt;P&gt;/opt/splunk/etc/apps/search/lookups&lt;/P&gt;&lt;P&gt;Where those created by the&amp;nbsp; &lt;STRONG&gt;| outputcsv&lt;/STRONG&gt; command are in the&amp;nbsp;/opt/splunk/var/run/splunk/csv folder. And&amp;nbsp;the&amp;nbsp;&lt;STRONG&gt;| lookup&lt;/STRONG&gt; command has no way of knowing this.&lt;BR /&gt;&lt;BR /&gt;Thanks and God bless,&lt;BR /&gt;Genesius&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 18:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642903#M222666</guid>
      <dc:creator>genesiusj</dc:creator>
      <dc:date>2023-05-10T18:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642908#M222667</link>
      <description>&lt;P&gt;I suppose that's all true, but it has nothing to do with my answer.&amp;nbsp; I suggested the &lt;FONT face="courier new,courier"&gt;inputcsv&lt;/FONT&gt; command, the logical counterpart to &lt;FONT face="courier new,courier"&gt;outputcsv&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 19:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642908#M222667</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-05-10T19:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642910#M222668</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I might have confused the issue.&lt;/P&gt;&lt;P&gt;When a lookup file is created with the &lt;STRONG&gt;| outputlookup&lt;/STRONG&gt; command, it is available to be used with the &lt;STRONG&gt;| lookup&lt;/STRONG&gt; command.&lt;/P&gt;&lt;P&gt;When a lookup file is created with the &lt;STRONG&gt;| outputcsv&lt;/STRONG&gt; command, it is not available to be used with the &lt;STRONG&gt;| lookup&lt;/STRONG&gt; command.&lt;/P&gt;&lt;P&gt;Both of my lookup files,&lt;EM&gt; abc.csv&lt;/EM&gt; and &lt;EM&gt;xyz.csv&lt;/EM&gt;, were created with the&amp;nbsp;&lt;STRONG&gt;| outputcsv&lt;/STRONG&gt; command. Therefore, the&amp;nbsp;&lt;STRONG&gt;| lookup&lt;/STRONG&gt; command cannot be used.&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup abc.csv
| lookup xyz.csv field1 output field2&lt;/LI-CODE&gt;&lt;P&gt;This does not.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv abc.csv
| lookup xyz.csv field1 output field2&lt;/LI-CODE&gt;&lt;P&gt;Thanks and God bless,&lt;BR /&gt;Genesius&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 19:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642910#M222668</guid>
      <dc:creator>genesiusj</dc:creator>
      <dc:date>2023-05-10T19:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642913#M222669</link>
      <description>&lt;P&gt;I agree that the issue is confused.&amp;nbsp; First, the inputlookup command doesn't work, then it does. I don't know where to go from here.&lt;/P&gt;&lt;P&gt;Have you considered using &lt;FONT face="courier new,courier"&gt;outputlookup&lt;/FONT&gt; rather than &lt;FONT face="courier new,courier"&gt;outputcsv&lt;/FONT&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 12:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642913#M222669</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-05-11T12:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: I Have 2 csv Files Created with outputcsv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642926#M222678</link>
      <description>&lt;P&gt;If you are trying to use outputcsv to create LOOKUP files that can be used as lookups - you can't.&lt;/P&gt;&lt;P&gt;outputcsv creates files that are NOT available for lookups. inputcsv can be used to retrieve a file created with outputcsv, but it is still NOT a lookup file and you cannot use it as a lookup.&lt;/P&gt;&lt;P&gt;The issue around bundle replication is real and creating huge lookups does break replication for all apps on the search head, so you are sensibly trying to address the issue.&lt;/P&gt;&lt;P&gt;However, if you need to use one of your CSVs as a lookup and you don't want that huge file to be replicated, then you will need to configure settings in the app's distsearch.conf&lt;/P&gt;&lt;P&gt;See the spec here&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.4/Admin/Distsearchconf#.27classic.27_REPLICATION-SPECIFIC_SETTINGS" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.4/Admin/Distsearchconf#.27classic.27_REPLICATION-SPECIFIC_SETTINGS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and you should look at these two parameters&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;concerningReplicatedFileSize = &amp;lt;integer&amp;gt;
excludeReplicatedLookupSize = &amp;lt;integer&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This will allow you to create lookups with outputlookup and use lookup against those lookups you have created.&lt;/P&gt;&lt;P&gt;Note that outputcsv is also not supported in Splunk Cloud, so is not a practical option if you are going to migrate to Cloud at any time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 21:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/642926#M222678</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-05-10T21:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: How would I search what records are in the larger of 2 csv Files Created with outputcsv?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/643397#M222874</link>
      <description>&lt;P&gt;Just as a follow up.&lt;/P&gt;&lt;P&gt;The reason for the large lookup files is because we have to run multiple dbxquery and dbxlookup commands to bring data in from multiple sources (hundreds of thousands of records). However, we now working with our DBAs to assist in writing more efficient queries that will join multiple tables/views. Hopefully, reducing the number and runtime for the queries.&lt;/P&gt;&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt; and &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; for your help.&lt;BR /&gt;God bless,&lt;BR /&gt;Genesius&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 14:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-search-what-records-are-in-the-larger-of-2-csv-Files/m-p/643397#M222874</guid>
      <dc:creator>genesiusj</dc:creator>
      <dc:date>2023-05-15T14:15:04Z</dc:date>
    </item>
  </channel>
</rss>

