<?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 Re: Data types in document from tWriteJSONField in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242921#M29592</link>
    <description>What is the work around to this issue?
&lt;BR /&gt;Still seems to be a major problem:
&lt;BR /&gt;
&lt;A href="https://jira.talendforge.org/browse/TDI-25966?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-25966?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel&lt;/A&gt;</description>
    <pubDate>Thu, 17 Apr 2014 04:27:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-17T04:27:48Z</dc:date>
    <item>
      <title>Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242917#M29588</link>
      <description>I'm trying to send a POST request to a REST service of JSON format. I am using the tRestClient component which requires an input schema of 
&lt;BR /&gt;body (type: document) 
&lt;BR /&gt;string (type: string) 
&lt;BR /&gt;The service requires a request schema: 
&lt;BR /&gt; 
&lt;PRE&gt;{&lt;BR /&gt;    "ID": Integer,&lt;BR /&gt;    "Name": "String"&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;When I send the JSON to the tRestClient component, I am getting a Bad Request Exception, I believe it's because the output of tWriteJSON field is outputting column1 as a string rather than an integer (i.e. it is enclosed in double quotes). You can see this in the code below. 
&lt;BR /&gt;How do I manipulate the data types of the values from the tWriteJSONfield component, while still keeping the output schema of type document (as is required for the tRestClient component). 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3534&lt;BR /&gt; connected&lt;BR /&gt;09:57:20,351 INFO   Using default type string&lt;BR /&gt;|{"ID":"34842","Name":"Name1"}&lt;BR /&gt;Exception in component tRESTClient_3&lt;BR /&gt;javax.ws.rs.BadRequestException&lt;BR /&gt;        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;BR /&gt;        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)&lt;BR /&gt;        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)&lt;BR /&gt;        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)&lt;BR /&gt;        at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:452)&lt;BR /&gt;        at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:858)&lt;BR /&gt;        at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:829)&lt;BR /&gt;        at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:392)&lt;BR /&gt;        at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:418)&lt;BR /&gt;        at vu_mdm_title.writeback_0_1.Writeback.tWriteJSONField_1_InProcess(Writeback.java:5833)&lt;BR /&gt;        at vu_mdm_title.writeback_0_1.Writeback$1ThreadXMLField_tWriteJSONField_1_Out.run(Writeback.java:3329)&lt;BR /&gt; disconnected&lt;BR /&gt;Job Writeback ended at 09:57 27/03/2014. &lt;/PRE&gt; 
&lt;BR /&gt;If I set the output of tWriteJSON to be of type int and string (instead of document and string) then the tRestClient component throws a "body/string cannot be resolved" error. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDCy.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145503i62BFF831108CA28A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDCy.png" alt="0683p000009MDCy.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDTM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149586i7B05FAFAFF9EC4AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDTM.png" alt="0683p000009MDTM.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242917#M29588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242918#M29589</link>
      <description>Hi 
&lt;BR /&gt;To pass a request with json format to a rest web service, use a tXMLMap, instead of tWriteJsonField, to build a document before tRestClient, and select json option from the accept type list on tRestClient.
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 28 Mar 2014 02:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242918#M29589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-28T02:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242919#M29590</link>
      <description>Hi Shong,
&lt;BR /&gt;How do I build a JSON with the tXMLMap component?
&lt;BR /&gt;My understanding is that it would output an XML document like
&lt;BR /&gt;&amp;lt;root&amp;gt;
&lt;BR /&gt; &amp;lt;ID&amp;gt; 1234 &amp;lt;/ID&amp;gt;
&lt;BR /&gt; &amp;lt;Name&amp;gt; "Name" &amp;lt;/Name&amp;gt;
&lt;BR /&gt;&amp;lt;/root&amp;gt;
&lt;BR /&gt;which isn't what I need. My initial input is 2 columns, which I need to format into a JSON before it goes through to the tRestClient component.</description>
      <pubDate>Fri, 28 Mar 2014 15:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242919#M29590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-28T15:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242920#M29591</link>
      <description>bump. Shong could you please expand on your answer?</description>
      <pubDate>Mon, 31 Mar 2014 06:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242920#M29591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T06:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242921#M29592</link>
      <description>What is the work around to this issue?
&lt;BR /&gt;Still seems to be a major problem:
&lt;BR /&gt;
&lt;A href="https://jira.talendforge.org/browse/TDI-25966?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-25966?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel&lt;/A&gt;</description>
      <pubDate>Thu, 17 Apr 2014 04:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242921#M29592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-17T04:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242922#M29593</link>
      <description>Hi. 
&lt;BR /&gt;These are the options I'm aware of: 
&lt;BR /&gt;- Use tXMLMap with tRESTClient - this relies on the internal CXF DOM4J (XML) to JSON auto conversion. If you go this way then you can also have the root dropped, etc, there are few JSON related properties in tRESTClient/Advanced 
&lt;BR /&gt;- Use other Studio components to create JSON in the String format - and feed it directly into tRESTClient, bypassing tXMLMap 
&lt;BR /&gt;Does it help a bit ? 
&lt;BR /&gt;Sergey</description>
      <pubDate>Thu, 17 Apr 2014 10:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242922#M29593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-17T10:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data types in document from tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242923#M29594</link>
      <description>Hi,
&lt;BR /&gt;Suggestion by shong to create a json file
&lt;BR /&gt;
&lt;A href="http://www.talendforge.org/forum/viewtopic.php?pid=132391" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/viewtopic.php?pid=132391&lt;/A&gt;
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Thu, 17 Apr 2014 11:14:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-types-in-document-from-tWriteJSONField/m-p/2242923#M29594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-17T11:14:41Z</dc:date>
    </item>
  </channel>
</rss>

