<?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: Upload .json file in req body as a binary file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378199#M140010</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000OBooEAAT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136028i5FED5D9D43D88F6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000OBooEAAT.png" alt="0695b00000OBooEAAT.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im currently creating the above mentioned .json file in tFileOutputDelimited_2.&lt;/P&gt;&lt;P&gt;How do I proceed to get the answer in your way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 05:53:23 GMT</pubDate>
    <dc:creator>heshkaru</dc:creator>
    <dc:date>2022-02-18T05:53:23Z</dc:date>
    <item>
      <title>Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378194#M140005</link>
      <description>&lt;P&gt;curl -XPOST -u 'xxxxx:xxxxxx' 'https://xxxxxxxxxxxxxxxxxxxx/etl_staging/_bulk' --data-binary @etl-staging-job1.json -H 'Content-Type: application/json'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to upload a json file and use it in a POST API&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 08:50:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378194#M140005</guid>
      <dc:creator>heshkaru</dc:creator>
      <dc:date>2022-02-17T08:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378195#M140006</link>
      <description>&lt;P&gt;Set a tRestClient's Http method to "POST", the Content Type to "JSON" and read the JSON into the component's "string" column. &lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 16:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378195#M140006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-17T16:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378196#M140007</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;My target is to send and API call to ElasticSearch index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -XPOST localhost:9200/index_local/my_doc_type/_bulk --data-binary  @/home/data1.json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do rather than reading the whole json body.(Its a quite a bit huge json)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 16:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378196#M140007</guid>
      <dc:creator>heshkaru</dc:creator>
      <dc:date>2022-02-17T16:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378197#M140008</link>
      <description>&lt;P&gt;Actually data is in below format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{ "index" : { } }&lt;/P&gt;&lt;P&gt;{ "ENV":"PROD", "BATCH_ID": "2021-10-10 08:27:16","TEST_CASE": "test_case3", "IS_TEST_CASE_MATCHED" : "FALSE", "COMPARISON": "POL", "OLD_PURCHASE_ORDER_NO": "ADDQYU5B", "NEW_PURCHASE_ORDER_NO":"100018718", "OLD_OC_NUMBER":"U0056A", "NEW_OC_NUMBER":"GIMEDN", "SEQUENCE":"1000", "JSON_PATH":"transmissionStatus", "IS_MATCHED":"TRUE", "EXPECTED_VALUE":"ADDQYU5B", "ACTUAL_VALUE":"ADDQYU5B" }&lt;/P&gt;&lt;P&gt;{ "index" : { } }&lt;/P&gt;&lt;P&gt;{ "ENV":"PROD", "BATCH_ID": "2021-10-10 08:27:16","TEST_CASE": "test_case2", "IS_TEST_CASE_MATCHED" : "FALSE", "COMPARISON": "POL", "OLD_PURCHASE_ORDER_NO": "ADDQYU5B", "NEW_PURCHASE_ORDER_NO":"100018718", "OLD_OC_NUMBER":"U0056A", "NEW_OC_NUMBER":"GIMEDN", "SEQUENCE":"1000", "JSON_PATH":"transmissionStatus", "IS_MATCHED":"TRUE", "EXPECTED_VALUE":"100018718", "ACTUAL_VALUE":"100018718" }&lt;/P&gt;&lt;P&gt;{ "index" : { } }&lt;/P&gt;&lt;P&gt;{ "ENV":"PROD", "BATCH_ID": "2021-10-10 08:27:16","TEST_CASE": "test_case1", "IS_TEST_CASE_MATCHED" : "FALSE", "COMPARISON": "POL", "OLD_PURCHASE_ORDER_NO": "ADDQYU5B", "NEW_PURCHASE_ORDER_NO":"100018718", "OLD_OC_NUMBER":"U0056A", "NEW_OC_NUMBER":"GIMEDN", "SEQUENCE":"1000", "JSON_PATH":"transmissionStatus", "IS_MATCHED":"FALSE", "EXPECTED_VALUE":"ADDQYU5B", "ACTUAL_VALUE":"100018718" }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;somewhat different from json, but this is the way that elasticsearch identifies index and data&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 17:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378197#M140008</guid>
      <dc:creator>heshkaru</dc:creator>
      <dc:date>2022-02-17T17:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378198#M140009</link>
      <description>&lt;P&gt;What you appear to have there is multiple JSON documents. One "command" line followed by a "data" line. I have had to follow this process before with ElasticSearch.....but a while ago. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How huge is the file? Reading it shouldn't cause any issues and I believe that the body of the API is intended to contain the JSON as String. If the file is huge, it would actually make sense to break it up into several posts than  just one large one....although you can try that I guess.  But as I said, the ElasticSearch API requires the data in the body. The Curl --data-binary command (this is Curl and not related to ElasticSearch, so shouldn't be use with Talend) simply reads the content of the file into the body. So even though it looks like you are sending a packages file with Curl, you are just reading the contents.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 18:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378198#M140009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-17T18:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378199#M140010</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000OBooEAAT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136028i5FED5D9D43D88F6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000OBooEAAT.png" alt="0695b00000OBooEAAT.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im currently creating the above mentioned .json file in tFileOutputDelimited_2.&lt;/P&gt;&lt;P&gt;How do I proceed to get the answer in your way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 05:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378199#M140010</guid>
      <dc:creator>heshkaru</dc:creator>
      <dc:date>2022-02-18T05:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378200#M140011</link>
      <description>&lt;P&gt;Is that creating the JSON you showed me above? Has that JSON been tested with CUrl? If so, I guess "if it ain't broke, don't fix it" comes to mind. But this does not look like the best method of generating the JSON.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regard to sending it with the tRestClient, you just need to read it from the file (maybe with a tFileInputRaw) and make sure the JSON text is passed to the "string" input schema column of the tRestClient.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 11:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378200#M140011</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-18T11:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upload .json file in req body as a binary file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378201#M140012</link>
      <description>&lt;P&gt;Above job creates the .json file and curl is working fine. Need to sort this TRestClient task. Thank you for your time. I will try to apply this&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 12:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Upload-json-file-in-req-body-as-a-binary-file/m-p/2378201#M140012</guid>
      <dc:creator>heshkaru</dc:creator>
      <dc:date>2022-02-18T12:05:16Z</dc:date>
    </item>
  </channel>
</rss>

