Creating specific start and stop time historical partition

In my module I analyze processes as they happen with specific start and stop times. Is it possible using the Java sdk to create a new partition either at the start time or at the end time to hold the data only for the process being analyzed? Fully usable partitions that can be queried across if desired.

I don’t think so, no. You could maybe try manually creating partitions and associated records in the sqlth_partitions table, but it’s somewhat ‘dangerous’.

“I don’t think so” is vague. Can you be less so? I see that there is info in SDK for partition creation, is usage by mortals not granted? Define “somewhat ‘dangerous’”. Causes mysterious operation, is unsupported, or what.

No, you don’t have access to the internal tag historian classes that drive the creation of partitions.
You can certainly try creating partitions manually - but it’s not something we test against, or something we’re obliged to support. I don’t know, for sure, whether it would work - I’m inclined to think it probably would, but I don’t know, for instance, what happens if you define two partitions in sqlth_partitions that cover the same timespan for the same provider. ‘Undefined behavior’ is generally not a thing you want when we’re talking about stored process data.

If you want to play around with partitions, you could leave the automatic partitions untouched and, in a second schema, create the partitions you’re looking for and copy over the relevant data from the automatic partitions. You could create manipulated sqlth tables in this second schema to match your partitions. This will make sure that you don’t mangle your automatic partitions. Just be wary of how you copy over the data, depending on the amount of data, you could lock up your DB history tables for quite a while.