Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Vthota1687286448
Contributor
Contributor

Unable to read data from Mogodb using talend open studio

Hi @all

Talend open studio Version: 8.0.1

Mondo Db version : 4.0.9

when in run below job connections look working , but when trying to query collection throws error , please help

0695b00000ly4l9AAA.png

0695b00000ly4lJAAQ.png

Error:

Exception in component tMongoDBInput_1 (MongoDbTOSnowflake)

java.lang.RuntimeException: db error [not authorized for query on qas.Form]

at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:321)

at com.mongodb.DBCursor._check(DBCursor.java:253)

at com.mongodb.DBCursor._hasNext(DBCursor.java:374)

at com.mongodb.DBCursor.hasNext(DBCursor.java:399)

at usgbc_dev_etl.mongodbtosnowflake_0_1.MongoDbTOSnowflake.tMongoDBInput_1Process(MongoDbTOSnowflake.java:795)

at usgbc_dev_etl.mongodbtosnowflake_0_1.MongoDbTOSnowflake.tMongoDBConnection_1Process(MongoDbTOSnowflake.java:431)

at usgbc_dev_etl.mongodbtosnowflake_0_1.MongoDbTOSnowflake.runJobInTOS(MongoDbTOSnowflake.java:1197)

at usgbc_dev_etl.mongodbtosnowflake_0_1.MongoDbTOSnowflake.main(MongoDbTOSnowflake.java:1035)

Labels (3)
7 Replies
Anonymous
Not applicable

Hello @VENKATESHWARLU thota​ ,

You need to assign the read role to the mongo db user in question, e.g.

db.grantRolesToUser(

"your_user",

[

{ role: "read", db: "your_db" }

]

)

please refer to the article : https://stackoverflow.com/questions/22067612/mongodb-not-authorized-for-query-admin-system-users

Best regards

Aiming

 

Vthota1687286448
Contributor
Contributor
Author

Hi @Aiming Chen​ 

Thanks for the response, but with the same user I can able to query data using Studio 3T,

 

I will double with the MongoDb admin regarding the read role

 

Thanks,

Venkat

Vthota1687286448
Contributor
Contributor
Author

@Aiming Chen​ 

MongoDB component ( mongo-1.3.jar)

Talend version 8.0.1

 

IMPORTANT: when I put a password/username empty in the connection component, the connection is showing success

is there any problem with jar file?

 

please suggest the correct mongodb jar for talend version 8.0.1

 

Vthota1687286448
Contributor
Contributor
Author

@Xiaodi Shi​ 

 

Anonymous
Not applicable

Hello @VENKATESHWARLU thota​ ,

If you select the DB Version = "MongoDB 4.4.X and later" in tMongoDBConnection as the below to re-try?0695b00000ly6WLAAY.png 

Vthota1687286448
Contributor
Contributor
Author

HI @Aiming Chen​ 

 

I see below the MongoDB connection component

 

 

0695b00000ly8j7AAA.png  

Vthota1687286448
Contributor
Contributor
Author

@Xiaodi Shi​ @not specified not specified​ 

can guys able to help me ?