<?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 HDF - Flatten a xml file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134583#M23278</link>
    <description>&lt;P&gt;Is it possible to flat xml file using NiFi? For example:  &lt;A target="_blank" href="https://odieweblog.wordpress.com/2011/12/13/how-to-flatten-out-an-xml-hierarchical-structure/"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://odieweblog.wordpress.com/2011/12/13/how-to-flatten-out-an-xml-hierarchical-structure/"&gt;&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 12:32:28 GMT</pubDate>
    <dc:creator>nsabharwal</dc:creator>
    <dc:date>2026-04-21T12:32:28Z</dc:date>
    <item>
      <title>HDF - Flatten a xml file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134583#M23278</link>
      <description>&lt;P&gt;Is it possible to flat xml file using NiFi? For example:  &lt;A target="_blank" href="https://odieweblog.wordpress.com/2011/12/13/how-to-flatten-out-an-xml-hierarchical-structure/"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://odieweblog.wordpress.com/2011/12/13/how-to-flatten-out-an-xml-hierarchical-structure/"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 12:32:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134583#M23278</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2026-04-21T12:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: HDF - Flatten a xml file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134584#M23279</link>
      <description>&lt;P&gt;
	Yes, check out these processors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.TransformXml/index.html"&gt;TransformXml&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.EvaluateXQuery/index.html"&gt;EvaluateXQuery&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.EvaluateXPath/index.html"&gt;EvaluateXPath&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;With approaches described in your link above and these processors one should be able to achieve it easily.&lt;/P&gt;&lt;UL&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 19 Mar 2016 18:37:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134584#M23279</guid>
      <dc:creator>andrewg</dc:creator>
      <dc:date>2016-03-19T18:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: HDF - Flatten a xml file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134585#M23280</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/173/agrande.html" nodeid="173"&gt;@Andrew Grande&lt;/A&gt;  and &lt;A rel="user" href="https://community.cloudera.com/users/140/nsabharwal.html" nodeid="140"&gt;@Neeraj Sabharwal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;1) I was able to use the TransFormXml processor to convert the xml in the following format&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &lt;/P&gt;&lt;P&gt;-&amp;lt;ROWSET&amp;gt; &amp;lt;ROW kind="element" name="Product" pid="" id="d1e1"&amp;gt; &amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Type" pid="d1e1" id="d1e1a1373"&amp;gt;Laptop&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Notebook" pid="d1e1" id="d1e3"&amp;gt; &amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Brand" pid="d1e3" id="d1e3a1403"&amp;gt;HP&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Model" pid="d1e3" id="d1e3a1938"&amp;gt;Pavilion dv6-3132TX Notebook&amp;lt;/ROW&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Harddisk" pid="d1e3" id="d1e5"&amp;gt;640 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Processor" pid="d1e3" id="d1e8"&amp;gt;Intel Core i7&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="RAM" pid="d1e3" id="d1e11"&amp;gt;4 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Notebook" pid="d1e1" id="d1e15"&amp;gt; &amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Brand" pid="d1e15" id="d1e15a1403"&amp;gt;HP&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Model" pid="d1e15" id="d1e15a1938"&amp;gt;HP Pavilion dv6-3032TX Notebook&amp;lt;/ROW&amp;gt; &amp;lt;ROW kind="element" name="Harddisk" pid="d1e15" id="d1e17"&amp;gt;640 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Processor" pid="d1e15" id="d1e20"&amp;gt;Intel Core i7&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="RAM" pid="d1e15" id="d1e23"&amp;gt;6 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Notebook" pid="d1e1" id="d1e27"&amp;gt; &amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Brand" pid="d1e27" id="d1e27a1403"&amp;gt;Toshiba&amp;lt;/ROW&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;ROW kind="attribute" name="Model" pid="d1e27" id="d1e27a1938"&amp;gt;Satellite A660/07R 3D Notebook&amp;lt;/ROW&amp;gt; &amp;lt;ROW kind="element" name="Harddisk" pid="d1e27" id="d1e29"&amp;gt;640 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Processor" pid="d1e27" id="d1e32"&amp;gt;Intel Core i7&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="RAM" pid="d1e27" id="d1e35"&amp;gt;4 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Notebook" pid="d1e1" id="d1e39"&amp;gt; &amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="attribute" name="Brand" pid="d1e39" id="d1e39a1403"&amp;gt;Toshiba&amp;lt;/ROW&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;ROW kind="attribute" name="Model" pid="d1e39" id="d1e39a1938"&amp;gt;Satellite A660/15J Notebook&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Harddisk" pid="d1e39" id="d1e41"&amp;gt;640 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="Processor" pid="d1e39" id="d1e44"&amp;gt;Intel Core i5&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;ROW kind="element" name="RAM" pid="d1e39" id="d1e47"&amp;gt;6 GB&amp;lt;/ROW&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;/ROWSET&amp;gt;&lt;/P&gt;&lt;P&gt;2) my question is how to convert the following xquery in the sample for Nifi's EvaluateXQuery :&lt;/P&gt;&lt;P&gt;    (In the example, oracle is using.)&lt;/P&gt;&lt;P&gt; SELECT x.* &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt; FROM xml_test t
       , &lt;/P&gt;&lt;P style="margin-left: 60px;"&gt;XMLTable('/ROWSET/ROW' &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;          passing xmltransform(t.object_value, xmltype(:xsldoc)) &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;columns node_id         varchar2(100)   path '@id'
                , &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;node_name       varchar2(30)    path '@name'
                , &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;node_value      varchar2(2000)  path 'text()'
                , &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;parent_node_id  varchar2(100)   path '@pid'
                , &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;node_kind       varchar2(30)    path '@kind' &lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;        ) x
 ;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 22:35:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDF-Flatten-a-xml-file/m-p/134585#M23280</guid>
      <dc:creator>toandyliang</dc:creator>
      <dc:date>2017-03-08T22:35:35Z</dc:date>
    </item>
  </channel>
</rss>

