3

Is there a way to programmatically write data to Time Series Insights Gen2?

In our case we regularily compute values based on the raw data. The computation requires more logic than simply applying aggregates to values of a single time series.

I want to re-ingest the result of the computation and it's timestamp to TSI so i can query it along with the raw data.

Is the only way to achieve this by sending an event with the computation result to IoT Hub or Event Hub the same way it was for Gen1 as seen here or am i missing something?

Markus S.
  • 2,602
  • 13
  • 44

1 Answers1

2

It still stands true for Gen2 that the only way to add data to TSI is through an EventHub or IoTHub - see: https://learn.microsoft.com/en-us/azure/time-series-insights/concepts-streaming-ingestion-event-sources

Please add a new feature request here with your scenario details so others can vote and we prioritize other ways to ingest data differently than through IoT Hub or Event Hub.

For your scenario though you can send the result of the computation to your IoT Hub or Event Hub via HTTP --both services have an HTTP endpoint-- but be aware that it's not advisable to mix historical data with real-time data, so if you do this you should do the calculation as soon as possible -- within the same day as the original event or sooner.

asergaz
  • 996
  • 5
  • 17
  • thank you for your comment. we are planning to continously calculate values based on the raw values. so usually the calculated values should get ingested on the same day. but if some calculation changes we will have to recalculate the values and send in new versions of calculated values of the past. wo i'm wondering what would happen if we do this? would this result in temporarily decreased performance because of some new indexing happening or could this seriously mess up the database? – Markus S. Nov 28 '20 at 11:34
  • 1
    Markus I apologize, I failed to see your comment here. Within the same 24 hr period is okay, but if you send events with timestamps prior to that it could seriously mess up your cold query performance, and is not a supported scenario. However, I am gathering requirements for your scenario around UPSERT. If you could please as a comment here with your scenario and scale that would be very helpful https://feedback.azure.com/forums/906859-azure-time-series-insights/suggestions/42126406-add-data-de-duplication-and-upsert – ranah Jan 28 '21 at 23:45