<?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 Nifi Attribute splitting in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136223#M98874</link>
    <description>&lt;P&gt;I've worked out how to pull down information from online json and parse the basics into attributes and write those out to a file.   I would like to split one of those attributes from 1 to two different attributes....This seems basic to me, but for the life of me I can't seem to work out the logic in NiFi&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;attribute1 =  2016-06-13T11:52:19-05:00&lt;/P&gt;&lt;P&gt;I'd like to split that on the T into two attributes like the following:&lt;/P&gt;&lt;P&gt;attribute2: 2016-06-13&lt;/P&gt;&lt;P&gt;attributes3: 11:52:19-05:00&lt;/P&gt;&lt;P&gt;In Python this is just date, time = timestamp.split('T', 1), but alas Nifi is eluding me with the end goal is to write this out into a flat file or Hive, but either way there are a bunch of needs I'll have for something like the above split.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 02:42:30 GMT</pubDate>
    <dc:creator>todd_wilkinson</dc:creator>
    <dc:date>2016-06-14T02:42:30Z</dc:date>
    <item>
      <title>Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136223#M98874</link>
      <description>&lt;P&gt;I've worked out how to pull down information from online json and parse the basics into attributes and write those out to a file.   I would like to split one of those attributes from 1 to two different attributes....This seems basic to me, but for the life of me I can't seem to work out the logic in NiFi&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;attribute1 =  2016-06-13T11:52:19-05:00&lt;/P&gt;&lt;P&gt;I'd like to split that on the T into two attributes like the following:&lt;/P&gt;&lt;P&gt;attribute2: 2016-06-13&lt;/P&gt;&lt;P&gt;attributes3: 11:52:19-05:00&lt;/P&gt;&lt;P&gt;In Python this is just date, time = timestamp.split('T', 1), but alas Nifi is eluding me with the end goal is to write this out into a flat file or Hive, but either way there are a bunch of needs I'll have for something like the above split.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 02:42:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136223#M98874</guid>
      <dc:creator>todd_wilkinson</dc:creator>
      <dc:date>2016-06-14T02:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136224#M98875</link>
      <description>&lt;P style="margin-left: 40px;"&gt; &lt;A rel="user" href="https://community.cloudera.com/users/11100/toddwilkinson.html" nodeid="11100"&gt;@Todd Wilkinson&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;I would use replacetext processor.  more info &lt;A href="https://nifi.apache.org/docs.html"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Updates the content of a FlowFile by evaluating a Regular Expression (regex) against it and replacing the section of the content that matches the Regular Expression with some alternate value.&lt;/P&gt;&lt;P&gt;you would search for the value and replace with output $1, $2, etc.&lt;/P&gt;&lt;P&gt;You can also use replaceTextWithMapping.  &lt;/P&gt;&lt;P&gt;Updates the content of a FlowFile by evaluating a Regular Expression against it and replacing the section of the content that matches the Regular Expression with some alternate value provided in a mapping file.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 02:44:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136224#M98875</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-06-14T02:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136225#M98876</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11100/toddwilkinson.html" nodeid="11100"&gt;@Todd Wilkinson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I'd use an UpdateAttribute processor by adding two dynamic properties and using expression language as follow:&lt;/P&gt;&lt;P&gt;attribute2 =&amp;gt; ${attribute1:substringBefore('T')}&lt;/P&gt;&lt;P&gt;attribute3 =&amp;gt; ${attribute1:substringAfter('T')}&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Expression language guide : &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 02:45:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136225#M98876</guid>
      <dc:creator>pvillard</dc:creator>
      <dc:date>2016-06-14T02:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136226#M98877</link>
      <description>&lt;P&gt;Perfect,   that got me moving forward in the right direction !&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 03:05:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136226#M98877</guid>
      <dc:creator>todd_wilkinson</dc:creator>
      <dc:date>2016-06-14T03:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136227#M98878</link>
      <description>&lt;P&gt;The question is regarding splitting the attributes of the FlowFile. ReplaceText and ReplaceTextWithMapping both work on the content of the FlowFile, not the attributes.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 20:13:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136227#M98878</guid>
      <dc:creator>jpercivall</dc:creator>
      <dc:date>2016-06-14T20:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136228#M98879</link>
      <description>&lt;P&gt;You can use this custom processor for your problem. (and you can contribute if you want )&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/guvencenanguvenal/nifi-splitcreateattribute" target="_blank"&gt;https://github.com/guvencenanguvenal/nifi-splitcreateattribute&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 04:00:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136228#M98879</guid>
      <dc:creator>guvencenan</dc:creator>
      <dc:date>2018-08-17T04:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Attribute splitting</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136229#M98880</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/92279/guvencenan.html" nodeid="92279"&gt;@Guven
 Guvenal&lt;/A&gt;  this is a great custom processor,  you should create a HOWTO Article here about how to use it and or create one about how to make Custom Processors. &lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 18:52:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Attribute-splitting/m-p/136229#M98880</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2018-08-17T18:52:43Z</dc:date>
    </item>
  </channel>
</rss>

