<?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 XML input to tExtractXMLField and customize the output records in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-input-to-tExtractXMLField-and-customize-the-output-records/m-p/2361317#M125708</link>
    <description>&lt;P&gt;I am new to talend and putting lot of efforts to be proficient. I will explain my scenario with an example:&lt;BR /&gt;1. I am extracting data from a DB2 table and this table has 4 columns:&lt;/P&gt; 
&lt;P&gt;Column 3 XML_DATA&lt;/P&gt; 
&lt;P&gt;2. Finally, loading all the data into Hive table on the HDFS. Hive table format is as follows:&lt;/P&gt; 
&lt;PRE&gt;CREATE EXTERNAL TABLE IF NOT EXISTS SampleTable
(
Id Int,
IDB_Id String,
occ String
Status String,
Original_Retail String,
Id1 String,
occ1 String,
New_Item Array&amp;lt;Struct&amp;lt;Type: String,occ2: String,Code: String,Vendor_Description: String,Family: String,Style_Diff_Id: String,IDB_Id1: String&amp;gt;&amp;gt;,
Vendor_Style: String
)&lt;/PRE&gt; 
&lt;P&gt;3. "Column 3 XML_DATA" column is given as input to tExtractXMLField component. I was able to loop thru the XML to generate the output file in the following format (Multiple records for column 3 XML_DATA) :&lt;/P&gt; 
&lt;PRE&gt;273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331350986;10880;XSmall;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351094;10965;Small;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351240;10970;Medium;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351387;10975;Large;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351492;10980;XLarge;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351679;10985;XXLarge;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350985;COLOR;331350987;489;AQUA NAVY;;273586991.489;0438554206201;3622223&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Questions:&lt;/P&gt; 
&lt;P&gt;I would like to merge all the above records in the following format which is the structure of the Hive table. How do i do that?&lt;/P&gt; 
&lt;PRE&gt;273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE|331350986|10880|XSmall|||:SIZE|331351094|10965|Small|||:SIZE|331351240|10970|Medium|||:SIZE|331351387|10975|Large|||:SIZE|331351492|10980|XLarge|||:SIZE|331351679|10985|XXLarge|||:COLOR|331350987|489|AQUA NAVY||273586991.489|0438554206201;3622223&lt;/PRE&gt; 
&lt;P&gt;Sample XML file is attached.&lt;BR /&gt;FileXML is attached.&lt;/P&gt; 
&lt;P&gt;Thank you and appreciate your response.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:41:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:41:53Z</dc:date>
    <item>
      <title>XML input to tExtractXMLField and customize the output records</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-input-to-tExtractXMLField-and-customize-the-output-records/m-p/2361317#M125708</link>
      <description>&lt;P&gt;I am new to talend and putting lot of efforts to be proficient. I will explain my scenario with an example:&lt;BR /&gt;1. I am extracting data from a DB2 table and this table has 4 columns:&lt;/P&gt; 
&lt;P&gt;Column 3 XML_DATA&lt;/P&gt; 
&lt;P&gt;2. Finally, loading all the data into Hive table on the HDFS. Hive table format is as follows:&lt;/P&gt; 
&lt;PRE&gt;CREATE EXTERNAL TABLE IF NOT EXISTS SampleTable
(
Id Int,
IDB_Id String,
occ String
Status String,
Original_Retail String,
Id1 String,
occ1 String,
New_Item Array&amp;lt;Struct&amp;lt;Type: String,occ2: String,Code: String,Vendor_Description: String,Family: String,Style_Diff_Id: String,IDB_Id1: String&amp;gt;&amp;gt;,
Vendor_Style: String
)&lt;/PRE&gt; 
&lt;P&gt;3. "Column 3 XML_DATA" column is given as input to tExtractXMLField component. I was able to loop thru the XML to generate the output file in the following format (Multiple records for column 3 XML_DATA) :&lt;/P&gt; 
&lt;PRE&gt;273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331350986;10880;XSmall;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351094;10965;Small;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351240;10970;Medium;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351387;10975;Large;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351492;10980;XLarge;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE;331351679;10985;XXLarge;;;;3622223
273586991;0438554206218;331350659;A;16.0;3201550;331350985;COLOR;331350987;489;AQUA NAVY;;273586991.489;0438554206201;3622223&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Questions:&lt;/P&gt; 
&lt;P&gt;I would like to merge all the above records in the following format which is the structure of the Hive table. How do i do that?&lt;/P&gt; 
&lt;PRE&gt;273586991;0438554206218;331350659;A;16.0;3201550;331350984;SIZE|331350986|10880|XSmall|||:SIZE|331351094|10965|Small|||:SIZE|331351240|10970|Medium|||:SIZE|331351387|10975|Large|||:SIZE|331351492|10980|XLarge|||:SIZE|331351679|10985|XXLarge|||:COLOR|331350987|489|AQUA NAVY||273586991.489|0438554206201;3622223&lt;/PRE&gt; 
&lt;P&gt;Sample XML file is attached.&lt;BR /&gt;FileXML is attached.&lt;/P&gt; 
&lt;P&gt;Thank you and appreciate your response.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-input-to-tExtractXMLField-and-customize-the-output-records/m-p/2361317#M125708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: XML input to tExtractXMLField and customize the output records</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-input-to-tExtractXMLField-and-customize-the-output-records/m-p/2361318#M125709</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You want all of your outputs from tExtractXMLField to be merged together? I&lt;SPAN class="shortdesc"&gt;n the form of a single column of output data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="shortdesc"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="shortdesc"&gt;Sabrina&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 07:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-input-to-tExtractXMLField-and-customize-the-output-records/m-p/2361318#M125709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-05T07:29:31Z</dc:date>
    </item>
  </channel>
</rss>

