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 105 forks source link

[OrionMySQLSink] Allow update option #502

Open mecmTID opened 9 years ago

mecmTID commented 9 years ago

The current behaviour is that any update in an entity will create a new row in the table in the database, it would be interesting to be able to just update the existing row for the entity when the entity is updated in Orion.

mecmTID commented 9 years ago

I'm thinking here about the following example: I have an entity which contains information about the time an incidence was opened, read and resolved. I'd like to model it in the database as 3 columns, one for each of the states of the incidence. Right now, every time the incidence is updated, a new row is created. A workaround here, if the update row option is not feasible, is to have a state and a state-time attribute, and two columns in the database, one for the state and another one for the time in which that state was reached.

manucarrace commented 1 year ago

Implemented lastdata mode. in https://github.com/telefonicaid/fiware-cygnus/blob/dbf8bb4e93f5d3e8498285d0c48ca9f55e6e2351/doc/cygnus-ngsi/flume_extensions_catalogue/last_data_function.md

fgalan commented 1 year ago

I understand this issue can be closed. As @manucarrace comments, the functionality is implemented (I guess we didn't realized this old issue exists when we implemented it...)