<?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 How to ignore not known json fields in tHMap processing in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354313#M120322</link>
    <description>I have a job that calls REST API, retrieves json and transforms it using tHMap.
&lt;BR /&gt;
&lt;BR /&gt;I faced the problem: when provider adds some fields to json returned by API (I do not use those fields and can ignore them), i got an exception like:
&lt;BR /&gt;
&lt;PRE&gt;: com.oaklandsw.transform.runtime.Trace - line 15 null out$/Root emit: &amp;nbsp;''&lt;BR /&gt;Exception in component tHMap_1&lt;BR /&gt;java.lang.Exception: Overall: Fatal&lt;BR /&gt;1: Info - Executing map. (328) &lt;BR /&gt; &amp;nbsp;Map: /MARKETPLACE/Maps/Jobs/test/testEscapeProblem &amp;nbsp;Properties: {}&lt;BR /&gt;2: Fatal - An element appeared in a JSON document that was not present in the structure. If this element is a JSON value, consider selecting the Name is Value element property. &amp;nbsp;(1401) &lt;BR /&gt; &amp;nbsp;Enclosing  Element : Map: Maps/Jobs/test/testEscapeProblem.xml - Map Element: in$/Root&lt;BR /&gt; &amp;nbsp;somethingelse&lt;BR /&gt;3: Fatal - There was a problem with a Source using an I/O expression. The details are in the status item before this one. (344) &lt;BR /&gt; &amp;nbsp;I/O - IO Reader: Map Element: &amp;lt;root&amp;gt; &amp;nbsp;&amp;lt;Unknown function&amp;gt; Rep: JSON id: 0x6d3a388c URL: &amp;lt;map/struct source&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;This is because json structure in tHMap is based on sample json:
&lt;BR /&gt;
&lt;PRE&gt;{&lt;BR /&gt;	"element": "value"&lt;BR /&gt;}&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;And the json I am transforming is:
&lt;BR /&gt;
&lt;PRE&gt;{&lt;BR /&gt;	"element": "val1",&lt;BR /&gt;	"somethingelse": "val2"&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;So "somethingelse" key is missing in my structure. I don't want to add "somethingelse" key to my structure because the point here it to be forward compatible in meaning I don't want to fail if provider adds some fields to his json.
&lt;BR /&gt;Is there any way to configure tHMap not to fail in such case?</description>
    <pubDate>Fri, 03 Jun 2016 09:47:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-03T09:47:16Z</dc:date>
    <item>
      <title>How to ignore not known json fields in tHMap processing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354313#M120322</link>
      <description>I have a job that calls REST API, retrieves json and transforms it using tHMap.
&lt;BR /&gt;
&lt;BR /&gt;I faced the problem: when provider adds some fields to json returned by API (I do not use those fields and can ignore them), i got an exception like:
&lt;BR /&gt;
&lt;PRE&gt;: com.oaklandsw.transform.runtime.Trace - line 15 null out$/Root emit: &amp;nbsp;''&lt;BR /&gt;Exception in component tHMap_1&lt;BR /&gt;java.lang.Exception: Overall: Fatal&lt;BR /&gt;1: Info - Executing map. (328) &lt;BR /&gt; &amp;nbsp;Map: /MARKETPLACE/Maps/Jobs/test/testEscapeProblem &amp;nbsp;Properties: {}&lt;BR /&gt;2: Fatal - An element appeared in a JSON document that was not present in the structure. If this element is a JSON value, consider selecting the Name is Value element property. &amp;nbsp;(1401) &lt;BR /&gt; &amp;nbsp;Enclosing  Element : Map: Maps/Jobs/test/testEscapeProblem.xml - Map Element: in$/Root&lt;BR /&gt; &amp;nbsp;somethingelse&lt;BR /&gt;3: Fatal - There was a problem with a Source using an I/O expression. The details are in the status item before this one. (344) &lt;BR /&gt; &amp;nbsp;I/O - IO Reader: Map Element: &amp;lt;root&amp;gt; &amp;nbsp;&amp;lt;Unknown function&amp;gt; Rep: JSON id: 0x6d3a388c URL: &amp;lt;map/struct source&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;This is because json structure in tHMap is based on sample json:
&lt;BR /&gt;
&lt;PRE&gt;{&lt;BR /&gt;	"element": "value"&lt;BR /&gt;}&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;And the json I am transforming is:
&lt;BR /&gt;
&lt;PRE&gt;{&lt;BR /&gt;	"element": "val1",&lt;BR /&gt;	"somethingelse": "val2"&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;So "somethingelse" key is missing in my structure. I don't want to add "somethingelse" key to my structure because the point here it to be forward compatible in meaning I don't want to fail if provider adds some fields to his json.
&lt;BR /&gt;Is there any way to configure tHMap not to fail in such case?</description>
      <pubDate>Fri, 03 Jun 2016 09:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354313#M120322</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T09:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore not known json fields in tHMap processing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354314#M120323</link>
      <description>Hi,&lt;BR /&gt;Could you please indicate on which build version you got this issue? Are you using tXMLMap in your work flow?&lt;BR /&gt;Screenshots of your job setting will be preferred.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 06 Jun 2016 03:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354314#M120323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-06T03:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore not known json fields in tHMap processing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354315#M120324</link>
      <description>I'm using Talend Data Management Platform 6.0.1.20151110_1633_patch. 
&lt;BR /&gt;I'm not using tXMLMap. Only tHMap component. 
&lt;BR /&gt;I attach screenshots of sample job showing this issue along with configuration of thMap component and structure 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/334407/thmap3.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009ME8u.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154580i33478DA7DF3D42B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009ME8u.png" alt="0683p000009ME8u.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/334407/thmap2.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEGs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138915i4F57CB428BEF8712/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEGs.png" alt="0683p000009MEGs.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/334407/thmap1.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEGx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150706i0F53FDD344AD302B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEGx.png" alt="0683p000009MEGx.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;&amp;nbsp; 
&lt;BR /&gt;And input json file that causes error: 
&lt;BR /&gt; 
&lt;PRE&gt;{&lt;BR /&gt;	"element": "val1",&lt;BR /&gt;	"somethingelse": "val2"&lt;BR /&gt;}&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 10:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354315#M120324</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-06T10:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore not known json fields in tHMap processing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354316#M120325</link>
      <description>&lt;P&gt;I'm facing a similar issue with tHMap and my json file, i.e. the json file sometimes has extra fields that I don't care about.&lt;/P&gt;&lt;P&gt;I'm getting the same message:&lt;/P&gt;&lt;P&gt;Warning - An element appeared in a JSON document that was not present in the structure. If this element is a JSON value, consider selecting the Name is Value element property.&amp;nbsp; (1401)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have any ideas on how to resolve?&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 01:17:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-ignore-not-known-json-fields-in-tHMap-processing/m-p/2354316#M120325</guid>
      <dc:creator>akelly</dc:creator>
      <dc:date>2018-05-04T01:17:21Z</dc:date>
    </item>
  </channel>
</rss>

