Skip to main content
Sep 1, 2022 7:27 AM UTC
Solved

connect two database for same thing

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

Sep 12, 2022 6:37 PM UTC

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,

3 replies

Sep 1, 2022 7:38 AM UTC
  • 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.
Sep 6, 2022 6:06 PM UTC

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.

Sep 12, 2022 6:37 PM UTC

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,