Skip to main content
6-Contributor
September 1, 2022
Solved

connect two database for same thing

  • September 1, 2022
  • 2 replies
  • 1276 views

Hi, 

I have two kind of data in my thing some data changes quite rarely while other data is frequent. I  want to store frequent data in influxdb and less frequent data in postgres because i'll be purging data every month. Is there any way to do this.

 

Thanks,

Adarsh

Best answer by pshashipreetham

Hi @AA_10034462 ,

You can Refer to: https://community.ptc.com/t5/ThingWorx-Developers/Storing-Thing-Properties-in-two-different-value-streams-DB-s/m-p/816669
As of now it can't be done, until and unless you wanna use a AnyDataChange Event on the Frequent Data to store in Postgres Values Streams.

 

Thanks,

2 replies

17-Peridot
September 1, 2022
  • Enable "Logged" check on frequent data change property in Thing to log in Valuestream with InfluxDB. 
  • Use data change event to log in Postgres for infrequent data with Subscription.
pshashipreetham
18-Opal
18-Opal
September 6, 2022

Hi @Sathishkumar_C ,

I have similar situation, a Thing is connected with the InfluxDb Value Stream, while Client want to store the less Frequent data in the Postgres(or avoid purge if it is in Influx Value streams), Because in Influx there is an retention policy which purges the data for every month, less frequent data should be avoided during the purge if it is in Influx, can this be achieved ?


Thanks,
Shashi.

pshashipreetham
18-Opal
18-Opal
September 12, 2022

Hi @AA_10034462 ,

You can Refer to: https://community.ptc.com/t5/ThingWorx-Developers/Storing-Thing-Properties-in-two-different-value-streams-DB-s/m-p/816669
As of now it can't be done, until and unless you wanna use a AnyDataChange Event on the Frequent Data to store in Postgres Values Streams.

 

Thanks,