Subject: [mongodb-user] Re: Is it possible to set a
projection with MongoConfigUtil in the same manner
of setting a query?

Thank you for your answer, this is exactly what I was looking for!

On Tuesday, August 8, 2017 at 6:34:55 AM UTC+3, Wan Bachtiar wrote:

Is there a way to also set a projection on the query, so less data would have to be transferred over the net?

Hi Asaf,

It’s been a while since you posted this question, have you found the answer yet ?

You can try with com.mongodb.hadoop.util.MongoConfigUtil setFields() to specify a projection document for documents retrieved from MongoDB.

If this doesn’t answer your question, please provide:

  • The version of mongo-hadoop connector
  • Snippet code example that you use to define the query.


You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see:
You received this message because you are subscribed to the G...

oogle Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at
To view this discussion on the web visit
For more options, visit

Programming list archiving by: Enterprise Git Hosting