<?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 print non-unique values for each row in a table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511523#M143401</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;Here's the code I'm running:. &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;index=miscapps sourcetype="app:z-ingest" &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;transaction source&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| where ProcessType = "UseCaseIngestion" AND isnotnull(TableName) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval CurrDate = now() &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval RunDate = strptime(TimeStamp, "%m/%d/%y") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval DaysSinceLoad = round((CurrDate - RunDate)/86400) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| fillnull value=0 DaysSinceLoad, ExtractRowCount, LandingRowCount, ProdRowCount, ReturnCode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| convert dur2sec(Duration) as Duration2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Hour = floor(Duration2/3600) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Duration2 = strftime(Duration2, "%M:%S") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval result = (Hour.":".Duration2) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Status=if((ReturnCode = 0) AND (DaysSinceLoad &amp;lt; 8), "Successful", "Error") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval ErrMsg= case(ReturnCode !=0, ErrorMessage, DaysSinceLoad &amp;gt; 7, "Stale Data Ingestion", 1=1, "None") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| rename Duration2 as Duration &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| dedup UseCase, DatabaseName, TableName &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| filldown UseCase, DatabaseName, ReturnCode, DaysSinceLoad&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| table UseCase, DatabaseName, TableName, Status, ReturnCode, SourceRowCount, ExtrRowCount, DaysSinceLoad, Duration&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The ouput leaves the UseCase, DatabaseName. Status, ReturnCode, and DaysSinceLoad fields blank on the second row.&amp;nbsp; I have everything for this job in a single log file, and I repeat every field in the log file each time I extract a new table. &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jul 2020 13:05:23 GMT</pubDate>
    <dc:creator>VictorCrunch</dc:creator>
    <dc:date>2020-07-29T13:05:23Z</dc:date>
    <item>
      <title>How to print non-unique values for each row in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511390#M143313</link>
      <description>&lt;P&gt;I have a script that extracts table data from a database and loads the data to other tables in another database.&amp;nbsp; Everything is written to a single log file, with all values reported for each table in the log file (e.g. table name, return code, row count, etc).&amp;nbsp; I'm trying to write the results for each table into a Splunk table, but I'm finding that fields with a single value (e.g. ReturnCode) only print on the first row.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I modify this to print the value for every table?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 19:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511390#M143313</guid>
      <dc:creator>VictorCrunch</dc:creator>
      <dc:date>2020-07-28T19:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511398#M143317</link>
      <description>&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;filldown&lt;/FONT&gt; command.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 18:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511398#M143317</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-28T18:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511409#M143321</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;thank you for the responcse, but filldown didn't solve my problem&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 19:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511409#M143321</guid>
      <dc:creator>VictorCrunch</dc:creator>
      <dc:date>2020-07-28T19:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511505#M143399</link>
      <description>Can you share your search(es)?</description>
      <pubDate>Wed, 29 Jul 2020 12:29:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511505#M143399</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-29T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511523#M143401</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;Here's the code I'm running:. &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;index=miscapps sourcetype="app:z-ingest" &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;transaction source&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| where ProcessType = "UseCaseIngestion" AND isnotnull(TableName) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval CurrDate = now() &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval RunDate = strptime(TimeStamp, "%m/%d/%y") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval DaysSinceLoad = round((CurrDate - RunDate)/86400) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| fillnull value=0 DaysSinceLoad, ExtractRowCount, LandingRowCount, ProdRowCount, ReturnCode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| convert dur2sec(Duration) as Duration2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Hour = floor(Duration2/3600) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Duration2 = strftime(Duration2, "%M:%S") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval result = (Hour.":".Duration2) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval Status=if((ReturnCode = 0) AND (DaysSinceLoad &amp;lt; 8), "Successful", "Error") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| eval ErrMsg= case(ReturnCode !=0, ErrorMessage, DaysSinceLoad &amp;gt; 7, "Stale Data Ingestion", 1=1, "None") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| rename Duration2 as Duration &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| dedup UseCase, DatabaseName, TableName &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| filldown UseCase, DatabaseName, ReturnCode, DaysSinceLoad&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;| table UseCase, DatabaseName, TableName, Status, ReturnCode, SourceRowCount, ExtrRowCount, DaysSinceLoad, Duration&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The ouput leaves the UseCase, DatabaseName. Status, ReturnCode, and DaysSinceLoad fields blank on the second row.&amp;nbsp; I have everything for this job in a single log file, and I repeat every field in the log file each time I extract a new table. &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 13:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511523#M143401</guid>
      <dc:creator>VictorCrunch</dc:creator>
      <dc:date>2020-07-29T13:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511599#M143422</link>
      <description>&lt;P&gt;Other than putting &lt;FONT face="courier new,courier"&gt;filldown&lt;/FONT&gt; before &lt;FONT face="courier new,courier"&gt;dedup&lt;/FONT&gt;, I don't know what to suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 18:05:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511599#M143422</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-29T18:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511602#M143423</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; I changed the order of the statements, but that didn't have any effect on my output. &amp;nbsp; Thanks for your input though.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 18:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511602#M143423</guid>
      <dc:creator>VictorCrunch</dc:creator>
      <dc:date>2020-07-29T18:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511608#M143426</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=miscapps sourcetype="app:z-ingest"
transaction source
| where ProcessType = "UseCaseIngestion" AND isnotnull(TableName)
| eval CurrDate = now()
| eval RunDate = strptime(TimeStamp, "%m/%d/%y")
| eval DaysSinceLoad = round((CurrDate - RunDate)/86400)
| fillnull value=0 DaysSinceLoad, ExtractRowCount, LandingRowCount, ProdRowCount, ReturnCode
| convert dur2sec(Duration) as Duration2
| eval Hour = floor(Duration2/3600)
| eval Duration2 = strftime(Duration2, "%M:%S")
| eval result = (Hour.":".Duration2)
| eval Status=if((ReturnCode = 0) AND (DaysSinceLoad &amp;lt; 8), "Successful", "Error")
| eval ErrMsg= case(ReturnCode !=0, ErrorMessage, DaysSinceLoad &amp;gt; 7, "Stale Data Ingestion", 1=1, "None")
| rename Duration2 as Duration

| table UseCase, DatabaseName, TableName, Status, ReturnCode, SourceRowCount, ExtrRowCount, DaysSinceLoad, Duration
| dedup UseCase, DatabaseName, TableName
| filldown UseCase, DatabaseName, ReturnCode, DaysSinceLoad&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It's better to make table first before filldown.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 18:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/511608#M143426</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-29T18:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/512133#M143624</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;Thanks for the response, but unfortunately that didn't make a difference in the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to "force" a new transaction in a log file? &amp;nbsp; I have a similar Splunk report that works well, the only difference being that the log for each table is contained in a separate log file. &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 12:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/512133#M143624</guid>
      <dc:creator>VictorCrunch</dc:creator>
      <dc:date>2020-08-03T12:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to print non-unique values for each row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/512136#M143625</link>
      <description>&lt;P&gt;I can't imagine it for a minute. please make a table.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 12:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-print-non-unique-values-for-each-row-in-a-table/m-p/512136#M143625</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-03T12:38:11Z</dc:date>
    </item>
  </channel>
</rss>

