<?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>question hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201272#M71609</link>
    <description>&lt;P&gt;i have this form of file as input &lt;/P&gt;&lt;P&gt;*******************************************************************************************************&lt;/P&gt;&lt;P&gt;2017-11-22 16:57:01.770651 IP 192.168.1.5.443 &amp;gt; 10.0.0.11.46250: Flags [P.], seq 1:47, ack 46, win 180, options [nop,nop,TS val 3232053199 ecr 2738373364], length 46&lt;/P&gt;&lt;P&gt;************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;i want to select only date,time,source,destination and then write them back in csv file .&lt;/P&gt;&lt;P&gt;i use this script &lt;/P&gt;&lt;PRE&gt;
reader = csv.reader(open(inputStream,"rb"),delimiter=' ')
            for row in reader:                         
                   outputStream.write(str([row[0],row[1],row[3],row[5]]))
                   outputStream.write(str('\n'))&lt;/PRE&gt;&lt;P&gt;put the output is like &lt;/P&gt;&lt;P&gt;['2017-11-18', '02:09:40.860818', '192.222.1.179.30106', '62.240.110.198.53:']&lt;/P&gt;&lt;P&gt;i want to remove the brackets and th qoutes &lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 23:02:04 GMT</pubDate>
    <dc:creator>mohamedhssm89</dc:creator>
    <dc:date>2017-11-22T23:02:04Z</dc:date>
    <item>
      <title>hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201272#M71609</link>
      <description>&lt;P&gt;i have this form of file as input &lt;/P&gt;&lt;P&gt;*******************************************************************************************************&lt;/P&gt;&lt;P&gt;2017-11-22 16:57:01.770651 IP 192.168.1.5.443 &amp;gt; 10.0.0.11.46250: Flags [P.], seq 1:47, ack 46, win 180, options [nop,nop,TS val 3232053199 ecr 2738373364], length 46&lt;/P&gt;&lt;P&gt;************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;i want to select only date,time,source,destination and then write them back in csv file .&lt;/P&gt;&lt;P&gt;i use this script &lt;/P&gt;&lt;PRE&gt;
reader = csv.reader(open(inputStream,"rb"),delimiter=' ')
            for row in reader:                         
                   outputStream.write(str([row[0],row[1],row[3],row[5]]))
                   outputStream.write(str('\n'))&lt;/PRE&gt;&lt;P&gt;put the output is like &lt;/P&gt;&lt;P&gt;['2017-11-18', '02:09:40.860818', '192.222.1.179.30106', '62.240.110.198.53:']&lt;/P&gt;&lt;P&gt;i want to remove the brackets and th qoutes &lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 23:02:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201272#M71609</guid>
      <dc:creator>mohamedhssm89</dc:creator>
      <dc:date>2017-11-22T23:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201273#M71610</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/43337/mohamedhssm89.html" nodeid="43337" target="_blank"&gt;@Mohamed Hossam&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You could use the ReplaceText processor instead of your script to accomplish what you are trying to do:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42719-screen-shot-2017-11-22-at-105111-am.png" style="width: 589px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17465i7379AA92349CBE80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42719-screen-shot-2017-11-22-at-105111-am.png" alt="42719-screen-shot-2017-11-22-at-105111-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The above ReplaceText processor will create 4 capture groups for the desired columns from your input FlowFiles.&lt;BR /&gt;It will even work against incoming FlowFiles that have multiple entries (1 per line)&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;If you find this answer addresses yoru question/issue, please take a moment to click "Accept" beneath the answer.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:34:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201273#M71610</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-08-18T05:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201274#M71611</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt Clarke&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;thank you for your response put the output drop the last column , it only get date , time , src . but don't get the dst  &lt;/P&gt;&lt;PRE&gt;2017-11-23 11:45:25.044084  192.222.1.179.1214 
&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 17:48:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201274#M71611</guid>
      <dc:creator>mohamedhssm89</dc:creator>
      <dc:date>2017-11-23T17:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201275#M71612</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@Matt Clarke&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for ur response but i have the first 3 values only , can't get the fourth value &lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 20:10:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201275#M71612</guid>
      <dc:creator>mohamedhssm89</dc:creator>
      <dc:date>2017-11-23T20:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: hi, i have a space seprated values file , and i want to select only some coloumns from this flow file then put them in hdfs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201276#M71613</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/43337/mohamedhssm89.html" nodeid="43337" target="_blank"&gt;@Mohamed Hossam&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I think you are missing space in search value property.&lt;/P&gt;&lt;P&gt;Use the below regex in search value property&lt;/P&gt;&lt;PRE&gt;^(.*?) (.*?) IP (.*?) &amp;gt; (.*?) .*$&lt;/PRE&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;PRE&gt;([^\s]+)\s([^\s]+)\sIP\s(.*)\s&amp;gt;\s([^\s]+).*&lt;/PRE&gt;&lt;P&gt;Use any of the above regex's.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Config:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42735-replace.png" style="width: 1471px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17464i2FC6BC0FBFADDE60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42735-replace.png" alt="42735-replace.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:34:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hi-i-have-a-space-seprated-values-file-and-i-want-to-select/m-p/201276#M71613</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T05:34:03Z</dc:date>
    </item>
  </channel>
</rss>

