<?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 not sort CSV file fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465901#M80299</link>
    <description>&lt;P&gt;Yes, I use the dashboard.&lt;BR /&gt;
What I want to do is:&lt;BR /&gt;
1. Upload log data in CSV format&lt;BR /&gt;
2. Analyze log data in dashboard using homebrew APP.&lt;BR /&gt;
(APP calculates the analysis result for each log line)&lt;BR /&gt;
3. Combine the original log data and analysis results and output as CSV file.&lt;/P&gt;

&lt;P&gt;Here is an example.&lt;/P&gt;

&lt;H2&gt;logdata.csv&lt;/H2&gt;

&lt;P&gt;col_a, col_b, col_c&lt;BR /&gt;
aaa, bbb, ccc&lt;BR /&gt;
ddd, eee, fff&lt;BR /&gt;
ggg, hhh, iii&lt;/P&gt;

&lt;H2&gt;Analysis results in APP&lt;/H2&gt;

&lt;P&gt;1&lt;BR /&gt;
2&lt;BR /&gt;
3&lt;/P&gt;

&lt;H2&gt;The desired output&lt;/H2&gt;

&lt;P&gt;col_a, col_b, col_c, Result&lt;BR /&gt;
aaa, bbb, ccc, 1&lt;BR /&gt;
ddd, eee, fff, 2&lt;BR /&gt;
ggg, hhh, iii, 3&lt;/P&gt;

&lt;P&gt;However, when output, the order of col_a, col_b, col_c, will change.&lt;BR /&gt;
I think it is because it is sorted when uploading.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:42:26 GMT</pubDate>
    <dc:creator>kobayashines</dc:creator>
    <dc:date>2020-09-30T02:42:26Z</dc:date>
    <item>
      <title>How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465896#M80294</link>
      <description>&lt;P&gt;I am Japanese. Posting using google translation.&lt;/P&gt;

&lt;P&gt;I want to output the CSV file uploaded to Splunk in the original field order with a header.&lt;BR /&gt;
However, when you upload a CSV file to Splunk, the fields are sorted alphabetically.&lt;/P&gt;

&lt;P&gt;Please let me know if there is a way to not sort when uploading.&lt;BR /&gt;
Or, please let me know if there is a way to restore the order when outputting.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 02:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465896#M80294</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2019-10-25T02:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465897#M80295</link>
      <description>&lt;P&gt;You should use the &lt;CODE&gt;table&lt;/CODE&gt; command before the final output.&lt;/P&gt;

&lt;P&gt;If you want to create dashboard:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/583127/how-to-show-more-selected-fields-on-dashboard-even.html"&gt;how-to-show-more-selected-fields-on-dashboard-even&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fields&amp;gt;your expected fields order&amp;lt;/fields&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please use this option.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 11:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465897#M80295</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-10-25T11:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465898#M80296</link>
      <description>&lt;P&gt;I'm sorry, there wasn't enough explanation.&lt;BR /&gt;
The user does not edit the SPL. (The user is not me.)&lt;BR /&gt;
Users only upload and download data.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 11:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465898#M80296</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2019-10-25T11:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465899#M80297</link>
      <description>&lt;P&gt;I'm not sure.&lt;BR /&gt;
Is uploading / downloading possible even though SPL is not available?&lt;BR /&gt;
Is it a question about the dashboard?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 13:27:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465899#M80297</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-10-25T13:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465900#M80298</link>
      <description>&lt;P&gt;Can you try importing your csv file using &lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;Lookup File Editor App&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 14:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465900#M80298</guid>
      <dc:creator>lloydknight</dc:creator>
      <dc:date>2019-10-25T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465901#M80299</link>
      <description>&lt;P&gt;Yes, I use the dashboard.&lt;BR /&gt;
What I want to do is:&lt;BR /&gt;
1. Upload log data in CSV format&lt;BR /&gt;
2. Analyze log data in dashboard using homebrew APP.&lt;BR /&gt;
(APP calculates the analysis result for each log line)&lt;BR /&gt;
3. Combine the original log data and analysis results and output as CSV file.&lt;/P&gt;

&lt;P&gt;Here is an example.&lt;/P&gt;

&lt;H2&gt;logdata.csv&lt;/H2&gt;

&lt;P&gt;col_a, col_b, col_c&lt;BR /&gt;
aaa, bbb, ccc&lt;BR /&gt;
ddd, eee, fff&lt;BR /&gt;
ggg, hhh, iii&lt;/P&gt;

&lt;H2&gt;Analysis results in APP&lt;/H2&gt;

&lt;P&gt;1&lt;BR /&gt;
2&lt;BR /&gt;
3&lt;/P&gt;

&lt;H2&gt;The desired output&lt;/H2&gt;

&lt;P&gt;col_a, col_b, col_c, Result&lt;BR /&gt;
aaa, bbb, ccc, 1&lt;BR /&gt;
ddd, eee, fff, 2&lt;BR /&gt;
ggg, hhh, iii, 3&lt;/P&gt;

&lt;P&gt;However, when output, the order of col_a, col_b, col_c, will change.&lt;BR /&gt;
I think it is because it is sorted when uploading.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465901#M80299</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2020-09-30T02:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465902#M80300</link>
      <description>&lt;P&gt;I am a contributor.&lt;BR /&gt;
I'm sorry. I misunderstood the cause of the problem.&lt;BR /&gt;
It seems that the column order problem is not due to csv upload but to the table command specification.&lt;/P&gt;

&lt;P&gt;This is the end of this question.&lt;BR /&gt;
Thank you for your cooperation.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 00:42:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465902#M80300</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2019-10-28T00:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465903#M80301</link>
      <description>&lt;P&gt;@lloydknight is correct; the &lt;CODE&gt;Lookup File Editor&lt;/CODE&gt; app will show you all fields, including invisible fields that begin with underscore ( &lt;CODE&gt;_&lt;/CODE&gt; ) characters, in the exact order that they appear.  This app is built into &lt;CODE&gt;Enterprise Security&lt;/CODE&gt; or you can install it on any other Search Head here:&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;https://splunkbase.splunk.com/app/1724/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 01:39:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465903#M80301</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-28T01:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465904#M80302</link>
      <description>&lt;P&gt;アドバイスありがとうございます。&lt;BR /&gt;
&lt;CODE&gt;Lookup File Editor App&lt;/CODE&gt;を試してみたところ、表示は元々の表示となっていました。&lt;BR /&gt;
しかし、データのアップロード後に、サーチとテーブルコマンドを実行したいです。(ダッシュボード上のqueryで実行します。)&lt;BR /&gt;
結局テーブルコマンドで入れ替わってしまい、上手くいきませんでした。&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 05:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465904#M80302</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2019-10-28T05:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to not sort CSV file fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465905#M80303</link>
      <description>&lt;P&gt;Thank you for the advice.&lt;BR /&gt;
When I tried &lt;CODE&gt;Lookup File Editor App&lt;/CODE&gt;, the display was the original display.&lt;BR /&gt;
However, after uploading data, I want to execute search and table commands. (Execute by query on the dashboard.)&lt;BR /&gt;
Eventually it was replaced with a table command and it did not work.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 05:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-not-sort-CSV-file-fields/m-p/465905#M80303</guid>
      <dc:creator>kobayashines</dc:creator>
      <dc:date>2019-10-28T05:40:24Z</dc:date>
    </item>
  </channel>
</rss>

