<?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 TDM Mapper - need to input multiple Json streams in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356241#M121815</link>
    <description>&lt;P&gt;I have a TDI job that calls an tHMap, and passes into it for input; a JsonDataStream; and generates output in Xml.&lt;BR /&gt;&lt;BR /&gt;The tHMap works fine.&lt;BR /&gt;&lt;BR /&gt;I have a new requirement, where I need to add an additional 1 or possible 2 different Json lookup streams; to be used with the main JsonDataStream; in doing some mapping for the Xml output.&lt;BR /&gt;&lt;BR /&gt;It seems that tHMap only allows 1 input.&lt;BR /&gt;I cannot use tXmlMap; because my output Xml structure is highly complex xml with many child of child group and loops; of which tXmlMap doesn't support.&lt;BR /&gt;&lt;BR /&gt;What is the best practice for having additional lookup Json streams along with my main data Json stream into my tHMap?&lt;BR /&gt;&lt;BR /&gt;Should I combine the lookup jsons 'into' my main data Json stream; before loading the tHMap?&lt;BR /&gt;&lt;BR /&gt;Just looking for the best practice for how to do this. &amp;nbsp;Haven't found any documentation on merging or combining different json files into one; or reading lookup files from within a Mapper.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 23:10:19 GMT</pubDate>
    <dc:creator>DaveTaylor</dc:creator>
    <dc:date>2017-07-27T23:10:19Z</dc:date>
    <item>
      <title>TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356241#M121815</link>
      <description>&lt;P&gt;I have a TDI job that calls an tHMap, and passes into it for input; a JsonDataStream; and generates output in Xml.&lt;BR /&gt;&lt;BR /&gt;The tHMap works fine.&lt;BR /&gt;&lt;BR /&gt;I have a new requirement, where I need to add an additional 1 or possible 2 different Json lookup streams; to be used with the main JsonDataStream; in doing some mapping for the Xml output.&lt;BR /&gt;&lt;BR /&gt;It seems that tHMap only allows 1 input.&lt;BR /&gt;I cannot use tXmlMap; because my output Xml structure is highly complex xml with many child of child group and loops; of which tXmlMap doesn't support.&lt;BR /&gt;&lt;BR /&gt;What is the best practice for having additional lookup Json streams along with my main data Json stream into my tHMap?&lt;BR /&gt;&lt;BR /&gt;Should I combine the lookup jsons 'into' my main data Json stream; before loading the tHMap?&lt;BR /&gt;&lt;BR /&gt;Just looking for the best practice for how to do this. &amp;nbsp;Haven't found any documentation on merging or combining different json files into one; or reading lookup files from within a Mapper.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 23:10:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356241#M121815</guid>
      <dc:creator>DaveTaylor</dc:creator>
      <dc:date>2017-07-27T23:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356242#M121816</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Indeed there is currently a feature request for this requirement:&lt;BR /&gt;&lt;A href="https://jira.talendforge.org/browse/TDM-5377" target="_blank" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDM-5377&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Nontheless, I can suggest a workaround:&lt;BR /&gt;-You can create your structures for all your input files (In my example, I have two input files):&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="STRUCT1.png" style="width: 609px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwE6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143159i49341CDD8799D024/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwE6.png" alt="0683p000009LwE6.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;and&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="STRUCT2.png" style="width: 577px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvVS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146184i4C5FFC2FB4C6E402/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvVS.png" alt="0683p000009LvVS.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;-Then in a map you can combine your structures. At root level, you have to make sure you have no I/O function&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MAP.png" style="width: 615px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw8t.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150420i6324F2151CF77E70/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw8t.png" alt="0683p000009Lw8t.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;-For each of your input structure, you assign a READURL function to read you input file&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="READ1.png" style="width: 572px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwEG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133869i6097512B265948EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwEG.png" alt="0683p000009LwEG.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;-In your job, your tHmap will have no input flow&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The weakness of this approach is that you will have to write down your input files on the file system.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Let me know if it meets your requirements or you need clarifications.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 07:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356242#M121816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T07:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356243#M121817</link>
      <description>&lt;P&gt;Eric,&lt;BR /&gt;Thanks for the reply and the suggested work-around.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my usecase, I am not reading my Json inputs from file; they are going to be served up via JSP-APIs, and will be Json Streams.&lt;BR /&gt;&lt;BR /&gt;I haven't used the 'ReadUrl' function; do you know if it is able to also read from a stream as opposed to a filesystem input?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If not, is there an alternative to join Json streams?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My other thought I am going to try; is inputting the Jsons into a tMap/or tXmlMap component, (that can receive multiple inputs), and attempt to map them to a single json outfrom from that map component....just haven't gotten it wired up to see if that approach will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 15:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356243#M121817</guid>
      <dc:creator>DaveTaylor</dc:creator>
      <dc:date>2017-07-28T15:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356244#M121818</link>
      <description>&lt;P&gt;No ReadURL only enable reading fils from a file system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 17:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356244#M121818</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T17:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356245#M121819</link>
      <description>&lt;P&gt;Thanks Eric.&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;For now I am trying your suggested approach above.&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;I have two input Json files.&lt;/P&gt; 
&lt;P&gt;I have made a structure for each(POs and Orders); and a third combined structure(Multi), that contains them both.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am missing something from your 3 and 4 example of the Multi-Structure.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When you say 'at the root level, make sure you have no I/O function.&lt;/P&gt; 
&lt;P&gt;(my root Node's IO/Database tab is empty)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;However, when I select either of my sub elements in the structure under the root (POs or Orders); neither of them have an IO/Database tab to place a ReadURL expression object into.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Only the Root element of the structure has the 'IO/Database' tab available.&lt;BR /&gt;I cannot find any settings to disable it there; or to enable that tab on the POs or Orders Elements.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I can see in your last screencap, you do have the POs node under Root selected; and it "is" showing to have a IO/Database tab for you to venue it's ReadURL expression object into.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;To restate what I did; following your example:&lt;BR /&gt;I have:&lt;BR /&gt;Structure1: POs&lt;BR /&gt;Structure2: Orders&lt;/P&gt; 
&lt;P&gt;Structure3: Multi (with Root and child siblings of POs and Orders underneath)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I feel like I am missing it where you say '&lt;SPAN&gt;in a map you can combine your structures'.&lt;BR /&gt;When I open a new map; it will only allow me to have 1 input structure...Can't see how to combine both into the map.&lt;BR /&gt;I can use the Multi Structure; but when I use it as the input structure to my map; the child (POs or Orders) elements don't have the IO/Database tab available on them.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;What am I missing?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Here are my screenshots:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Root.JPG" style="width: 587px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwEz.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148355iF39766842D97FEFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwEz.jpg" alt="0683p000009LwEz.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POs.JPG" style="width: 586px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwF4.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133583i700B67CDB7124698/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwF4.jpg" alt="0683p000009LwF4.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 18:18:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356245#M121819</guid>
      <dc:creator>DaveTaylor</dc:creator>
      <dc:date>2017-07-28T18:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356246#M121820</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In your "Multi" input structure (The one that combine the individual structures) do you inherit from each structure ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You should have something like:&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 756px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lvpt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135447i85B1D350576DC240/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lvpt.png" alt="0683p000009Lvpt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lri4"&gt;READURL.zip&lt;/A&gt;</description>
      <pubDate>Sat, 29 Jul 2017 06:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356246#M121820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-29T06:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356247#M121821</link>
      <description>&lt;P&gt;In my last reply, I uploaded my solution...&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 06:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356247#M121821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-29T06:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: TDM Mapper - need to input multiple Json streams</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356248#M121822</link>
      <description>&lt;P&gt;Or you can merge your inputs before calling tHmap (In such case remove data in I/O tab at map level).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is an example:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 485px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw8r.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156110iA207F4F11FE94E15/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw8r.png" alt="0683p000009Lw8r.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The tReplace remove feed lines and header in XML files&lt;/P&gt; 
&lt;P&gt;As I read files with tFileInputRaw, input is object type. I convert them into string with tConvertType&lt;/P&gt; 
&lt;P&gt;tsetGlovalVar store the two input in global variables&lt;/P&gt; 
&lt;P&gt;In tJavaRow, I merge the to files before calling tHmap (Adding a root element)&lt;/P&gt; 
&lt;P&gt;output_row.FILEMERGED = "&amp;lt;ROOT&amp;gt;"+((String)globalMap.get("FILE1"))&lt;BR /&gt;+ ((String)globalMap.get("FILE2"))+"&amp;lt;/ROOT&amp;gt;";&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If your inputs are Json and not files but stream, you will have to adjust slightly this process.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 14:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TDM-Mapper-need-to-input-multiple-Json-streams/m-p/2356248#M121822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T14:45:48Z</dc:date>
    </item>
  </channel>
</rss>

