<?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 to extract data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462833#M130516</link>
    <description>&lt;P&gt;Hi@gcusello&lt;BR /&gt;
.in A Datasource all the fields are in different columns (A-id,B-id or C-id,B-Manhour or C-Manhour);&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Example for A Datasource bellow.&lt;BR /&gt;
  ( A-id,B-id,B-Manhour&lt;BR /&gt;
   A-id,C-id,C-Manhour   )&lt;BR /&gt;
   A Datasource is the man-hour information of B ticket or C ticket.&lt;BR /&gt;
・you want different calculations for each row (in row1 B-Manhour, in row2 B-Manhour+Total value of C-Manhour and in row3 C-Manhour)&lt;BR /&gt;
Yes.&lt;BR /&gt;
・you want three rows for each B-id,&lt;BR /&gt;
Yes.&lt;BR /&gt;
relation between B-id and C-id is in C Datasource.&lt;BR /&gt;
Yes.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;　&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 01:06:49 GMT</pubDate>
    <dc:creator>1014502</dc:creator>
    <dc:date>2020-02-07T01:06:49Z</dc:date>
    <item>
      <title>How to extract data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462831#M130514</link>
      <description>&lt;P&gt;I want to know how to take data from multiple data sources by ID.&lt;BR /&gt;
The following is an example of a data source.&lt;BR /&gt;
A Datasource(A-id,B-id or C-id,B-Manhour or C-Manhour)&lt;BR /&gt;
B Datasource(B-id,B-subject)&lt;BR /&gt;
C Datasource(C-id,B-id,C-subject)&lt;BR /&gt;
※A datasource is Man-hour information、B Datasource is Parent ticket information、C-datasource is Child ticket information&lt;/P&gt;

&lt;P&gt;I want the output below.&lt;BR /&gt;
id  subject man-hour&lt;BR /&gt;
B-id    B-subject   Total value of B-Manhour&lt;BR /&gt;
B-id    B-subject   Total value of B-Manhour+Total value of C-Manhour&lt;BR /&gt;
B-id    B-subject   Total value of C-Manhour&lt;/P&gt;

&lt;P&gt;Please tell me how to do it.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 03:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462831#M130514</guid>
      <dc:creator>1014502</dc:creator>
      <dc:date>2020-02-06T03:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462832#M130515</link>
      <description>&lt;P&gt;Hi @1014502,&lt;BR /&gt;
your requisites aren't so clear, correct me if I'm wrong:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;in A Datasource all the fields are in different columns (A-id,B-id or C-id,B-Manhour or C-Manhour);&lt;/LI&gt;
&lt;LI&gt;you want different calculations for each row (in row1 B-Manhour, in row2 B-Manhour+Total value of C-Manhour and in row3 C-Manhour)&lt;/LI&gt;
&lt;LI&gt;you want three rows for each B-id,&lt;/LI&gt;
&lt;LI&gt;relation between B-id and C-id is in C Datasource.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Is it correct?&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 13:55:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462832#M130515</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-02-06T13:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462833#M130516</link>
      <description>&lt;P&gt;Hi@gcusello&lt;BR /&gt;
.in A Datasource all the fields are in different columns (A-id,B-id or C-id,B-Manhour or C-Manhour);&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Example for A Datasource bellow.&lt;BR /&gt;
  ( A-id,B-id,B-Manhour&lt;BR /&gt;
   A-id,C-id,C-Manhour   )&lt;BR /&gt;
   A Datasource is the man-hour information of B ticket or C ticket.&lt;BR /&gt;
・you want different calculations for each row (in row1 B-Manhour, in row2 B-Manhour+Total value of C-Manhour and in row3 C-Manhour)&lt;BR /&gt;
Yes.&lt;BR /&gt;
・you want three rows for each B-id,&lt;BR /&gt;
Yes.&lt;BR /&gt;
relation between B-id and C-id is in C Datasource.&lt;BR /&gt;
Yes.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;　&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 01:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462833#M130516</guid>
      <dc:creator>1014502</dc:creator>
      <dc:date>2020-02-07T01:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462834#M130517</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=your_index source=A OR source=B OR souce=C
| stats sum(Manhour) as Monhour values(subject) as subject by B-id , C-id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is no sample,  maybe not works.&lt;BR /&gt;
That's life.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 02:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462834#M130517</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-07T02:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462835#M130518</link>
      <description>&lt;P&gt;Hi @1014502,&lt;BR /&gt;
if it's acceptable for you to have results in three columns, you could run something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A Or index=B OR index=C
| stats sum(B-Manhour) AS B-Manhour sum(C-Manhour) AS C-Manhour BY B-id
| eval BC=B-Manhour+C-Manhour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I cannot test it, check in this way or adding C-id in BY clause of the stats command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A Or index=B OR index=C
| stats sum(B-Manhour) AS B-Manhour sum(C-Manhour) AS C-Manhour BY B-id C-id
| eval BC=B-Manhour+C-Manhour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2020 07:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data/m-p/462835#M130518</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-02-08T07:57:21Z</dc:date>
    </item>
  </channel>
</rss>

