<?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: Hunk is not displaying custom fields for csv in time of searching in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125130#M25814</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The other problem is the fields in searching result could not recognize&lt;BR /&gt;
the datatypes.How can I define data type in the source type?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;In Hunk/Splunk you don't need to define datatypes, they're automatically detected/converted at operation time. Are you running into any specific issues?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Nov 2014 18:57:59 GMT</pubDate>
    <dc:creator>Ledion_Bitincka</dc:creator>
    <dc:date>2014-11-28T18:57:59Z</dc:date>
    <item>
      <title>Hunk is not displaying custom fields for csv in time of searching</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125127#M25811</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am new to hunk.I have integrated hunk 6.2 with HDP 2.1.I am trying to do search on CSV using Hunk which are exported using sqoop?&lt;BR /&gt;
My problem is after defining custom fields for a CSV file, those are not showing when I do searching in Hunk.&lt;BR /&gt;
Headers already added in props.conf&lt;/P&gt;

&lt;P&gt;[csv-emp]&lt;BR /&gt;
FIELD_NAMES = versionno,id,empid,createdby,updatedby,createddate,updateddate&lt;BR /&gt;
INDEXED_EXTRACTIONS = csv&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
category = Custom&lt;BR /&gt;
description = Comma-separated value format. Set header and other settings in "Delimited Settings"&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;search query :&lt;BR /&gt;
index="etms" source="/apps/sqoop/db/employee_address/part-m-00000" sourcetype="csv-emp"&lt;/P&gt;

&lt;P&gt;what I need to do for filtering by custom fields in search time?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:12:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125127#M25811</guid>
      <dc:creator>nil_pakhi</dc:creator>
      <dc:date>2020-09-28T18:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk is not displaying custom fields for csv in time of searching</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125128#M25812</link>
      <description>&lt;P&gt;INDEXED_EXTRACTIONS  are not supported in Hunk. However Hunk is able to automatically recognize structured data files, especially csv - in this case it is failing because of the lack of the file extension.  If the files contain headers (ie first line == header) you can do the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[vix]
... 
vix.input.1.recordreader = com.splunk.mr.input.SimpleCSVRecordReader
vix.input.1.recordreader.csv.regex = /part-m-\d+$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the files do not contain headers (as they seem to be the output of MR job) you should use &lt;A href="http://blogs.splunk.com/2008/02/22/delimiter-base-kv-extraction-advanced/"&gt;delimiter based KV extraction&lt;/A&gt;:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;.../local/props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv-emp]
REPORT-emp-fields = emp-fields
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Custom
description = Comma-separated value format. Set header and other settings in "Delimited Settings"
pulldown_type = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;.../local/transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[emp-fields]
DELIMS = ","
FIELDS =  versionno,id,empid,createdby,updatedby,createddate,updateddate
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Nov 2014 20:26:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125128#M25812</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2014-11-21T20:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk is not displaying custom fields for csv in time of searching</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125129#M25813</link>
      <description>&lt;P&gt;Thanks It works.But I had to define some additional changes.&lt;BR /&gt;
I mentioned source for the file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/apps/sqoop/db/employee_address/part-m-00000]
sourcetype = csv-emp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The other problem is the fields in searching result could not recognize the datatypes.How can I define data type in the source type?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 05:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125129#M25813</guid>
      <dc:creator>nil_pakhi</dc:creator>
      <dc:date>2014-11-28T05:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk is not displaying custom fields for csv in time of searching</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125130#M25814</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The other problem is the fields in searching result could not recognize&lt;BR /&gt;
the datatypes.How can I define data type in the source type?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;In Hunk/Splunk you don't need to define datatypes, they're automatically detected/converted at operation time. Are you running into any specific issues?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 18:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Hunk-is-not-displaying-custom-fields-for-csv-in-time-of/m-p/125130#M25814</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2014-11-28T18:57:59Z</dc:date>
    </item>
  </channel>
</rss>

