This is the configuration I have done :
<dataConfig>
<dataSource name="mongod" type="JdbcDataSource"
driver="com.mongodb.jdbc.MongoDriver" url="*mongodb://<<IP
Address>>:27017/<<DB NAME>>*" *batchsize="-1" *user="*<<username>>*"
password="*<<password>>*"/>
<document name="products">
<entity name="products"
dataSource="mongod"
transformer="TemplateTransformer,ProdsCatsFieldTransformer"
onError="continue"
pk="uuid"
query="SELECT orgidStr,idStr,name,code,descr
iption,price,images,categoriesStr,enddate_solar,begin_date_s
olar,status_solar,current_stock_solar,retprice_solar,distpri
ce_solar,listprice_solar,mfgprice_solar,out_of_stock_
solar,hide_product_solar,saleprice_solar,metakey_solar,
sales_enabled,new_product,has_sku,configurable,rating,
updatedAt,comparable,hide_price FROM products WHERE orgidStr =
'${dataimporter.request.orgid}'"
However, it throws error when I run FULL IMPORT
:
getNext() failed for query 'SELECT orgidStr,idStr,name,code,descr
iption,price,images,categoriesStr,enddate_solar,begin_date_s
olar,status_solar,current_stock_solar,retprice_solar,distpri
ce_solar,listprice_solar,mfgprice_solar,out_of_stock_
solar,hide_product_solar,saleprice_solar,metakey_solar,
sales_enabled,new_product,has_sku,configurable,rating,
updatedAt,comparable,hide_price FROM products':java.lang.RuntimeException:
db error [not authorized for query on *<<DB NAME>>*.*<<COLLECTION NAME>>*]
I am using the right loginId and passcode for MongoDB and able to query the DB with same credentials. I am using the account which has all the privileges to perform any action on DB.
Any idea what could be the issue?