Have you tried using the service WritePropertiesToStream, this service can be used to add a row of data to a Stream.
Streams can store contextual data. For example, whenever a specific event is triggered, you can add the values of the other properties. This helps in the analysis of data
Use Streams to store and retrieve time series data.
Use Streams when you want to query data only within small time periods.
Ensure that your Data Tables have less than 100,000 rows.
Querying data from Data Tables and Streams should only take a few seconds.
If these Data Tables and Streams have more than 100,000 rows, the queries perform slowly
Use an external data store option if you need to perform any of the following tasks:
Query Streams for a large amount of data
Stream queries can retrieve a large number of records from the database before they are further filtered in the JVM memory.
It is recommended to add appropriate time intervals to minimize the number of rows retrieved by streams.
This helps especially when data starts to accumulate on the daily production use.
Use for less than 100,000 rows of data.
Use for static datasets and static lookup tables.
For highly dynamic and larger datasets, use a relational database that is connected via a Database ThingTemplate.
Data Tables do not support high-speed writing, as they do not have queuing mechanisms like Streams and Value Streams.
To manipulate or query the data row-by-row, use Data Tables.
Use indexes when working with Data Tables.
If you do not need to retrieve historical data very frequently, you can move all data to a separate ThingWorx instance (in a Data Table or Stream) or to a database server.