<?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: How to rename a MongoDB collection in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248762#M33522</link>
    <description>The new changes should be available in Talend 6.1.1. I'll be working on this feature so I'll keep you update on the progress. 
&lt;BR /&gt;Best Regrads,</description>
    <pubDate>Tue, 17 Nov 2015 11:00:16 GMT</pubDate>
    <dc:creator>amarouni</dc:creator>
    <dc:date>2015-11-17T11:00:16Z</dc:date>
    <item>
      <title>How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248757#M33517</link>
      <description>Hello everybody,
&lt;BR /&gt;I am trying to do something very simple; using Talend Open Studio for Big Data to rename a MongoDB collection. But I have some issues and I can not execute it successfully.
&lt;BR /&gt;First, I use a 
&lt;I&gt;tMongoDBRow&lt;/I&gt;&amp;nbsp;component where I have configured everything about the connection. Then in 
&lt;I&gt;Function field&lt;/I&gt;&amp;nbsp;I wrote this:
&lt;BR /&gt;"db.dim_division.renameCollection('dim_division_old',true);"
&lt;BR /&gt;And when I execute it, this is the error:
&lt;BR /&gt;
&lt;B&gt; connecting to socket on port 3695&lt;/B&gt;
&lt;BR /&gt;
&lt;B&gt; connected&lt;/B&gt;
&lt;BR /&gt;
&lt;B&gt;{ "serverUsed" : "xxxx:27017" , "ok" : 0.0 , "errmsg" : "not authorized on DATABASE to execute command { $eval: \"db.dim_division.renameCollection('dim_division_old',true);\", args: [] }" , "code" : 13}&lt;/B&gt;
&lt;BR /&gt;
&lt;B&gt; disconnected&lt;/B&gt;
&lt;BR /&gt;
&lt;BR /&gt;My server is a remote server. I read Mongodb docs and it says that user needs to have all privileges due to the fact Talend is using $eval behind the scenes.
&lt;BR /&gt;Some questions:
&lt;BR /&gt;1) 
&lt;I&gt;$eval&lt;/I&gt; 
&lt;B&gt;is deprecated&lt;/B&gt;
&lt;I&gt;&lt;B&gt;&amp;nbsp;&lt;/B&gt;&lt;/I&gt;in MongoDB 3.0. Is Talend going to change the way it executes theses functions?
&lt;BR /&gt;2) Should I now give all privileges to the user in order to be able to execute 
&lt;I&gt;$eval&lt;/I&gt;?
&lt;BR /&gt;3) There is another way to do such simple action as renaming a collection?
&lt;BR /&gt;4) Where can I found further documentation about executing 
&lt;I&gt;commands&lt;/I&gt;&amp;nbsp;(execute command option) and functions with tMongoDBRow?
&lt;BR /&gt;Thank you in advanced
&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 16 Nov 2024 10:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248757#M33517</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248758#M33518</link>
      <description>Hi 
&lt;BR /&gt;I made a testing on version 5.6.2 and it works,&amp;nbsp; 
&lt;I&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tMongoDBRow&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;uses&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;mongo-2.8.0.jar in this version. Uncheck the 'Execute command' box and type in the command as below:&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"db.oldname.renameCollection('newName')"&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 09 Nov 2015 09:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248758#M33518</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-09T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248759#M33519</link>
      <description>Hello&amp;nbsp;jmartinez, 
&lt;BR /&gt;1- The $eval and $doEval functions are not deprecated as of Mongo 3.0 Java API () which we use behind the scenes. They are deprecated on the mongoshell and will be deprecated soon in the Java API. 
&lt;BR /&gt;2- If you're planning to execute arbitrary code on your mongodb instance (using eval) you should, from a security perspective, have the full privileges on the database. 
&lt;BR /&gt;3- 4- In the next version of the tMongoDBRow we're moving from eval to command (runCommand) (-). Note that renaming a collection using the command (runCommand) requires access to the admin database. 
&lt;BR /&gt;By the way, the call should succeed on non-secure MongoDB instance. What type of authentication you're using ? &amp;nbsp; 
&lt;BR /&gt;Thanks,</description>
      <pubDate>Mon, 09 Nov 2015 10:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248759#M33519</guid>
      <dc:creator>amarouni</dc:creator>
      <dc:date>2015-11-09T10:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248760#M33520</link>
      <description>&amp;nbsp;Regards&amp;nbsp; shongHi 
&lt;BR /&gt;I made a testing on version 5.6.2 and it works,&amp;nbsp; 
&lt;I&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tMongoDBRow&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;uses&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;mongo-2.8.0.jar in this version. Uncheck the 'Execute command' box and type in the command as below:&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"db.oldname.renameCollection('newName')"&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong 
&lt;BR /&gt;Hello shong: 
&lt;BR /&gt; 
&lt;BR /&gt;Thank you for your answer. Yes, it works properly this way when I configure the security for using $eval.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 16 Nov 2015 08:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248760#M33520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-16T08:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248761#M33521</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello&amp;nbsp;jmartinez,&lt;BR /&gt;1- The $eval and $doEval functions are not deprecated as of Mongo 3.0 Java API () which we use behind the scenes. They are deprecated on the mongoshell and will be deprecated soon in the Java API.&lt;BR /&gt;2- If you're planning to execute arbitrary code on your mongodb instance (using eval) you should, from a security perspective, have the full privileges on the database.&lt;BR /&gt;3- 4- In the next version of the tMongoDBRow we're moving from eval to command (runCommand) (-). Note that renaming a collection using the command (runCommand) requires access to the admin database.&lt;BR /&gt;By the way, the call should succeed on non-secure MongoDB instance. What type of authentication you're using ? &amp;nbsp;&lt;BR /&gt;Thanks,&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hello amarouni: 
&lt;BR /&gt;Thank you for your answer too. 
&lt;BR /&gt;1- Thank you for the info. Certainly I checked mongoshell not Java API. 
&lt;BR /&gt;2- I don't want to execute arbitrary code, just collection rename. But as far as I know, this is the only way, right?. 
&lt;BR /&gt;3 &amp;amp; 4- Good news 
&lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://yutwg22796.i.lithium.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;. Do you know the roadmap for this change?. I know that I need to have more privileges than usual but far from 
&lt;I&gt;all privileges for all actions&lt;/I&gt;&amp;nbsp;as now. 
&lt;BR /&gt;I am using 
&lt;I&gt;MongoDB authentication&lt;/I&gt;&amp;nbsp;and it works properly now after giving to the user a special role like 
&lt;I&gt;all privileges for all actions&lt;/I&gt;. 
&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 16 Nov 2015 08:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248761#M33521</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-16T08:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248762#M33522</link>
      <description>The new changes should be available in Talend 6.1.1. I'll be working on this feature so I'll keep you update on the progress. 
&lt;BR /&gt;Best Regrads,</description>
      <pubDate>Tue, 17 Nov 2015 11:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248762#M33522</guid>
      <dc:creator>amarouni</dc:creator>
      <dc:date>2015-11-17T11:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a MongoDB collection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248763#M33523</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;The new changes should be available in Talend 6.1.1. I'll be working on this feature so I'll keep you update on the progress.&lt;BR /&gt;Best Regrads,&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hello amarouni: 
&lt;BR /&gt;Thank you for your efforts. 
&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 18 Nov 2015 14:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-rename-a-MongoDB-collection/m-p/2248763#M33523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-18T14:57:41Z</dc:date>
    </item>
  </channel>
</rss>

