telefonicaid / fiware-cygnus

A connector in charge of persisting context data sources into other third-party databases and storage systems, creating a historical view of the context
https://fiware-cygnus.rtfd.io/
GNU Affero General Public License v3.0
64 stars 104 forks source link

Can Cygnus-LD support sending aggregate data (max, min, sum, per hour, per day, etc) to PostgreSQL? #1969

Open Emiltzav opened 3 years ago

Emiltzav commented 3 years ago

Hello everyone! I'm using Cygnus-LD (Cygnus supporting NGSI-LD) to transfer NGSI-LD data from Orion-LD to PostgreSQL, but they are raw data (not aggregate). I would like to ask If there is a way to make Cygnus-LD send aggregate data (max, min, sum, per hour, per day, etc) to PostgreSQL like Cygnus does with the NGSI-STH Sink (it sends aggregate data to MongoDB from where STH Comet can retrieve them in the form of aggregate data, i.e. statistics such as average, sum, etc). I can't find a parameter (so far) in NGSILDPostgreSQLSink to make this happen.

fgalan commented 3 years ago

Maybe @anmunoz (author of the NGSI-LD support in Cygnus) could provide some feedback on this.

anmunoz commented 3 years ago

Hi,

At this moment the aggregation is not implemented yet. Maybe in a future release, we can include this feature.