You can translate the question and the replies:

Base view issue with MongoDB custom datsource

HI Team, I'm using Denodo 7.0. Created a MongoDB connection with custom datasource. Had a requirement to create a base view by selecting few fields from MongoDB collection. suppose collection 'abc' having 10 fields in it and we need to create base view on collection 'abc' with only 5 fields in it. But i'm facing issue with duplicates as i'm selecting few of the fields only for creating baseview which is expected. I must restrict the duplicates in base view only as i was not suppose to create any derived views. Please help with any logic to use in introspection query at base view creation to avoid duplicates in base view.
17-06-2022 17:15:50 -0400

3 Answers

Hello, Using the MongoDB Custom Wrapper, you can select the specific fields you want to import to Virtual DataPort using the following syntax: ``` field1:type1[,field2:type2,...] ``` For more guidance on how to use the MongoDB Custom Wrapper with Denodo, you can access the MongoDB Custom Wrapper - User Manual on [Specifying Fields](,Specifying%20Fields,-The%20use%20of) that contains some further details and examples. Regarding the duplicates you are getting after doing this, if you are referring to duplicate rows, my recommendation is for you to create a derived view on top of those and select the distinct clause. Hope this helps!
Denodo Team
20-06-2022 11:08:58 -0400
Thanks for the response. As per requirement, we shouldn't create new derived views to remove the duplicates and it needs to be clear in base view. Also, please guide how to give TRIM function to one of the field while creating base view from mongoDB collection. Can this be possible by Introspection query? provide the logic fo rthe same. Introspection query is not working for me. After providing Collection name and Fields, I tried giving a NOT NULL condition for a field Introspection query while creating base view. its throwing some error Error: could not match the input. Below is the logic used which worked fine in MongoDB compass. {Indicator: { $ne:null}} Please help with correct logic to use in Introspection query.
22-06-2022 18:22:15 -0400
Hello, Base views are meant to be a 1:1 representation of the underlying table. As such, if the source has duplicates, those will also be visible when executing the view. Regarding the Introspection query you quoted, I would make sure to include the escape character for the braces as it refers in the user manual that can be found in the document [Specifying Fields]( If you are a customer with a valid support user you can also open a Support Case and ask for further help, as someone will be able to better assist you! Hope this helps!
Denodo Team
27-06-2022 11:58:39 -0400
You must sign in to add an answer. If you do not have an account, you can register here