Skip to main content
pshashipreetham
18-Opal
18-Opal
September 2, 2022
Solved

Storing Thing Properties in two different value streams/DB's

  • September 2, 2022
  • 1 reply
  • 1403 views

Hi,

We have Postgres as an Model DB, InfluxDB as an Time series DB. Will it be possible in a Thing, few logged properties can be stored in the InfluxDB and few on Postgres ?

Because we run a retention policy every month for Influx DB, which purges Data on Monthly basis, there are few properties that are getting logged to be excluded from the Purge.

So if I assign a Thing with ValueStream of InfluxDB everything gets purged, there are few properties that should be excluded for client data Analysis.

Thanks,

Best answer by PaiChung

Unfortunately that isn't possible at this time, since a Thing is associated with only 1 Valuestream.

 

What you can do is to add a subscription (DataChange) on the properties you want to retain longer and have those write to a 'regular' Stream which has the other persistence provider. As long as you aren't 'exponentially' increasing the amount of events, and you aren't running very long processes off those subscriptions, it should be fine.

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
September 6, 2022

Unfortunately that isn't possible at this time, since a Thing is associated with only 1 Valuestream.

 

What you can do is to add a subscription (DataChange) on the properties you want to retain longer and have those write to a 'regular' Stream which has the other persistence provider. As long as you aren't 'exponentially' increasing the amount of events, and you aren't running very long processes off those subscriptions, it should be fine.