<?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 Getting error while trying to update a document using tMongoDBRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270536#M48412</link>
    <description>&lt;P&gt;I have a mongodb sharded cluster and I am trying to run update command on one of my collection using tMongoDBRow component. Inside the component I am running the update command as a function. However, when I am running Talend job I am getting this error -&amp;nbsp;"shard version not ok: version epoch mismatch detected for &amp;lt;database.collection&amp;gt;, the collection may&amp;nbsp;have been dropped and recreated".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help in resolving the issue is greatly appreciated. Thanks.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;MongoDB version - 3.6.2&lt;/P&gt; 
&lt;P&gt;Talend Open Studio for Big Data version -&amp;nbsp;7.1.1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2019 02:13:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-19T02:13:49Z</dc:date>
    <item>
      <title>Getting error while trying to update a document using tMongoDBRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270536#M48412</link>
      <description>&lt;P&gt;I have a mongodb sharded cluster and I am trying to run update command on one of my collection using tMongoDBRow component. Inside the component I am running the update command as a function. However, when I am running Talend job I am getting this error -&amp;nbsp;"shard version not ok: version epoch mismatch detected for &amp;lt;database.collection&amp;gt;, the collection may&amp;nbsp;have been dropped and recreated".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help in resolving the issue is greatly appreciated. Thanks.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;MongoDB version - 3.6.2&lt;/P&gt; 
&lt;P&gt;Talend Open Studio for Big Data version -&amp;nbsp;7.1.1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 02:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270536#M48412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T02:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while trying to update a document using tMongoDBRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270537#M48413</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;Here exists a jira issue from MongoDB's Issue Tracker.&lt;/P&gt; 
&lt;P&gt;Could you please have a look at it?&lt;/P&gt; 
&lt;P&gt;&lt;A title="https://jira.mongodb.org/browse/SERVER-28019" href="https://jira.mongodb.org/browse/SERVER-28019" target="_self" rel="nofollow noopener noreferrer"&gt;https://jira.mongodb.org/browse/SERVER-28019&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 06:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270537#M48413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-22T06:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while trying to update a document using tMongoDBRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270538#M48414</link>
      <description>&lt;P&gt;Hi Sabrina - Thanks for your response. However, I was able to get a workaround to my issue. I was able to execute update command in MongoDB using tMongoDBRow component by using "Execute command &amp;gt;&amp;gt; Construct command from a JSON string" and then providing following JSON string command and it is important to note that shard key should be used in "query" in below command, so in this case field1, field2, field3 should be your shard key -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"{findAndModify: '&amp;lt;collection name&amp;gt;',&lt;BR /&gt;query: {'&amp;lt;field1&amp;gt;': '&amp;lt;value1&amp;gt;',&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&amp;lt;field2&amp;gt;': '&amp;lt;value2&amp;gt;',&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&amp;lt;field3&amp;gt;': '&amp;lt;value3&amp;gt;'},&lt;BR /&gt;update: { '$set': {'field4': 'value4'} }&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Puneet&lt;BR /&gt;}"&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270538#M48414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-22T17:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while trying to update a document using tMongoDBRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270539#M48415</link>
      <description>&lt;P&gt;Hi Sabrina - Thanks for your response. However, I was able to get a workaround to my issue. I was able to execute update command in MongoDB using tMongoDBRow component by using "Execute command &amp;gt;&amp;gt; Construct command from a JSON string" and then providing following JSON string command and it is important to note that shard key should be used in "query" in below command, so in this case field1, field2, field3 should be your shard key -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"{findAndModify: '&amp;lt;collection name&amp;gt;',&lt;BR /&gt;query: {'&amp;lt;field1&amp;gt;': '&amp;lt;value1&amp;gt;',&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&amp;lt;field2&amp;gt;': '&amp;lt;value2&amp;gt;',&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&amp;lt;field3&amp;gt;': '&amp;lt;value3&amp;gt;'},&lt;BR /&gt;update: { '$set': {'field4': 'value4'} }&lt;BR /&gt;}"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Puneet&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:13:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Getting-error-while-trying-to-update-a-document-using/m-p/2270539#M48415</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-22T17:13:02Z</dc:date>
    </item>
  </channel>
</rss>

