Skip to content

Conversation

@nicho2
Copy link

@nicho2 nicho2 commented May 18, 2020

column name 'ts' is always required, but name can be other than 'value'

ex:

db.IndoorAirQuality_V2.aggregate ( [
{ "$match" : { "SenderBuildingEntity.Sentinel": { "$in" : ["$sentinelCO2"]},
"Date": { "$gte" : "$from" } } },
{"$sort" : {"Date" : 1}},

{"$project" : { "name" : "$SenderBuildingEntity.Sentinel", "value" : "$Datas.CO2", "ts" : "$Date", "_id" : 0} }
],
{"maxTimeMS":50000,"allowDiskUse":true})

column name 'ts' is always required, but name can be other than 'value'

ex:

db.IndoorAirQuality_V2.aggregate ( [
{ "$match" :    { "SenderBuildingEntity.Sentinel": { "$in" : ["$sentinelCO2"]},
  "Date": { "$gte" :  "$from" } }  },
{"$sort" : {"Date" : 1}},

{"$project" : {  "name" : "$SenderBuildingEntity.Sentinel",  "value" : "$Datas.CO2",  "ts" : "$Date",  "_id" : 0}  }
],
{"maxTimeMS":50000,"allowDiskUse":true})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant