We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is my data test store in MongoDB
{ "_id" : ObjectId("52983ff67dbf497a8bb0192b"), "data" : [ { "LoadPct" : 10, "RECORD_SEQ" : 1 } ] } { "_id" : ObjectId("5298400b7dbf497a8bb0192d"), "data" : [ { "LoadPct" : 59, "RECORD_SEQ" : 2 } ] } { "_id" : ObjectId("529840217dbf497a8bb01934"), "data" : [ { "LoadPct" : 8, "RECORD_SEQ" : 3 } ] } ....
I can not perform a query to get data like result of following query when i run it on mongo shell
db.collect.find({'data.LoadPct':{$gt:10}},{'data.LoadPct':1}).forEach(printjson)
{ "_id" : ObjectId("5298404d7dbf497a8bb01942"), "data" : [ { "LoadPct" : 59 } ] } ......
My R-Code to get result like above query
data <- dbGetQueryForKeys(mongoConn,"collect","{'data.LoadPct':{'$gt':10}}","{'data.LoadPct':1}")
and data return
data.LoadPct X_id 1 NA 5298400b7dbf497a8bb0192d 2 NA 5298404d7dbf497a8bb01942 3 NA 5298408c7dbf497a8bb019a2 4 NA 529840cc7dbf497a8bb019f5 5 NA 529840d17dbf497a8bb019fc .....
other code
data <- dbGetQueryForKeys(mongoConn,"collect","{'data.LoadPct':{'$gt':10}}","{'data':1,data.LoadPct:1}")
result
data data.LoadPct X_id 1 [ { "LoadPct" : 59}] NA 5298400b7dbf497a8bb0192d 2 [ { "LoadPct" : 24}] NA 5298404d7dbf497a8bb01942 3 [ { "LoadPct" : 50}] NA 5298408c7dbf497a8bb019a2 4 [ { "LoadPct" : 22}] NA 529840cc7dbf497a8bb019f5 5 [ { "LoadPct" : 11}] NA 529840d17dbf497a8bb019fc .....
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is my data test store in MongoDB
I can not perform a query to get data like result of following query when i run it on mongo shell
My R-Code to get result like above query
and data return
other code
result
The text was updated successfully, but these errors were encountered: