cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Best practise to store historical data plus live streaming data in a Thing

SOLVED
Highlighted
Newbie

Best practise to store historical data plus live streaming data in a Thing

Hi,

 

What should be the best practice to store the historical data from Excel and then later start storing Live streaming data in same properties of a Thing. I know as per the documentation, I should use Datatables to store static or historical data and Value Streams for Live streaming data but my setup is different. Initially, I need to push some Historical data of a device and later the same device will start pushing live data in TW. I am not sure how would I proceed to achieve this.

 

Please suggest me the best way possible.

Thanks in advance.

 

Best regards,

Neetu

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Carles,

I have resolved the issue. It's not about passing the date-time value in CSV, I had to change the date format in params object:

dateformat: "yyyy-MM-dd HH:mm:ss"

The string should be in exact above format (Case sensitive) to make it work.

Thanks for your support.

Regards,

Neetu

12 REPLIES 12

Re: Best practise to store historical data plus live streaming data in a Thing

If it's the same data that will be recorded live, than all have to go to the same storage, in this case Stream or ValueStream.

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Carles,


Thanks for your response.

Yes format of data will be same when recording live. But initially I will be pushing the data from CSV ? Can I push the CSV data in Value Stream?


Regards,

Neetu

Re: Best practise to store historical data plus live streaming data in a Thing

Yes for sure, you can read CSV files with the following extensions:

An you can insert data directly on the ValueStream with property owner Thing service:

  • Add+baseType+ValueStreamEntry

We usually combine booth without issues.

Re: Best practise to store historical data plus live streaming data in a Thing

Thanks alot Carles, I will try this way.

Regards,

Neetu

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Carles,

I am able to read data from CSV file using CSV extension and display it in Mashup in Grid widget. I am not sure how would I push data in ValueStream.

Do I need to create ValueStream and related properties in a Thing?

Regards,

Neetu

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Neetu,

Look at my original post the second part:

An you can insert data directly on the ValueStream with property owner Thing service:

  • Add+baseType+ValueStreamEntry

Re: Best practise to store historical data plus live streaming data in a Thing

Yes this is what I don't understand. Do you have any example to help me ?

Regards,

Neetu

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Carles,

I am able to store the historical data using UpdatePropertyValue service. But when I bind my Property to Time series chart, it is not showing all data values. It is only displaying 30 values out of 260. I don't know what went wrong?

Also, I want to use Date picker widget on my Time series chart so User can see some historical data, would it be possible?

Regards,

Neetu

Re: Best practise to store historical data plus live streaming data in a Thing

Hi Neetu,

Did you query Property values through the composer and checked that you have more than 30 values on the history?

Using date picker to query historical data it's not a problem at all, you just need to use startDate and endDate parameters on the property Query services.