<?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: How do I correlate two fields from various sources? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120344#M32310</link>
    <description>&lt;P&gt;My challenge: I need to know what is the employer office and what is the central phone he is using?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2014 17:46:48 GMT</pubDate>
    <dc:creator>dfigurello</dc:creator>
    <dc:date>2014-09-11T17:46:48Z</dc:date>
    <item>
      <title>How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120341#M32307</link>
      <description>&lt;P&gt;Hi Splunkers, &lt;/P&gt;

&lt;P&gt;I am having problem to correlate two sources in my splunk. &lt;BR /&gt;
How to add information in the table with a field located in various source. &lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;file1.csv&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  employer,location
    james,TEXAS
    John,CALIFORNIA
    Peter,OREGON
    Karon,MONTANA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;file2.csv&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name, central
james, MONTANA
james, MONTANA
james, TEXAS
Peter,OREGON
Peter,OREGON
Peter,OREGON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would create in splunk a table with 03 fields like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;employer | Employer Location  | central
james | TEXAS | MONTANA
james | TEXAS | MONTANA
james | TEXAS | TEXAS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 05:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120341#M32307</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2014-09-11T05:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120342#M32308</link>
      <description>&lt;P&gt;There are a couple of ways to do this in Splunk. However, if you have data that is not event-based and is just used for lookups, you should put it in a lookup table rather than indexing it in Splunk.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchTutorial/Usefieldlookups"&gt;Use field lookups&lt;/A&gt; tutorial describes how to set up a lookup table. In your case, the file1.csv should probably be the lookup table.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 06:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120342#M32308</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-11T06:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120343#M32309</link>
      <description>&lt;P&gt;Hi lguinn,&lt;/P&gt;

&lt;P&gt;I created two files to replicate a scenario in my splunk (files1.csv and files2.csv), however I am collecting data from 2 databases in real scenario. &lt;/P&gt;

&lt;P&gt;I have this structure in first source:&lt;BR /&gt;
employer | cod_location &lt;BR /&gt;
james | 01A&lt;BR /&gt;
John  | 02A &lt;/P&gt;

&lt;P&gt;Here I applied a lookup to convert the codes to city. &lt;BR /&gt;
My search returns:&lt;/P&gt;

&lt;P&gt;employer | cod_location | location(lookup)&lt;BR /&gt;
james | 01A | TEXAS&lt;BR /&gt;
John  | 02A | CALIFORNIA&lt;/P&gt;

&lt;P&gt;Now, I need create a "lookup" with internal data that correlate with another source&amp;gt;&lt;BR /&gt;
e.g:&lt;/P&gt;

&lt;P&gt;employer | location | Central&lt;BR /&gt;
james | TEXAS | MONTANA&lt;BR /&gt;
james | TEXAS | MONTANA&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 17:38:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120343#M32309</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2014-09-11T17:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120344#M32310</link>
      <description>&lt;P&gt;My challenge: I need to know what is the employer office and what is the central phone he is using?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 17:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120344#M32310</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2014-09-11T17:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120345#M32311</link>
      <description>&lt;P&gt;If you are using data from 2 databases, why not use Splunk DBConnect to retrieve the data instead of CSV files? Here is how to set up a lookup in Splunk DBConnect that accesses a database:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/DBX/1.1.4/DeployDBX/Setupadatabaselookuptable"&gt;http://docs.splunk.com/Documentation/DBX/1.1.4/DeployDBX/Setupadatabaselookuptable&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 19:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120345#M32311</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-11T19:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I correlate two fields from various sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120346#M32312</link>
      <description>&lt;P&gt;I got it:&lt;BR /&gt;
source="C:\Users\dfigurello\Desktop\xxx\ligacoes_tronco.csv" name=* central=* | rename nome as employer | join employer [ search index=brq source="C:\Users\dfigurello\Desktop\xxx\rm_local_sigla.csv" ] | stats count by employer ,central,central| sort - count | where count &amp;gt; 15 | where central!=central &lt;BR /&gt;
cheers&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:34:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-correlate-two-fields-from-various-sources/m-p/120346#M32312</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2020-09-28T17:34:45Z</dc:date>
    </item>
  </channel>
</rss>

