When modeling a new table or persistent class, allows to mark the table or persistent class as transient. The transient attribute will set how many time the data will exists in the database.
Transient data is useful to persist temporal data, like data sent by IoT devices, or data frame data for financial operations, etc.
If a class this definition will be on storage section, example:
<Storage name="Default">
<Data name="PersonDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Name</Value>
</Value>
<Value name="3">
<Value>SSN</Value>
</Value>
</Data>
<TransientRule>1h</TransientRule>
<DataLocation>^Sample.PersonD</DataLocation>
<DefaultData>PersonDefaultData</DefaultData>
<ExtentSize>200</ExtentSize>
<IdLocation>^Sample.PersonD</IdLocation>
<IndexLocation>^Sample.PersonI</IndexLocation>
<Property name="%%CLASSNAME">
<Selectivity>50.0000%</Selectivity>
</Property>
Could use h for hour, m for minute, s for second and you can combine, sample: 1h:10m.
For SQL create table:
CREATE TABLE table (column type IDENTITY, ...) TRANSIENTRULE '1h'
Thank you for submitting the idea. The status has been changed to "Community Opportunity".
Stay tuned!
Marking as "community opportunity", as I don't think we'll be adding this to the roadmap in the foreseeable future.
The proposed functionality would be possible to deliver in a rather lightweight framework with a subclass of %Persistent, using class parameters, and a scheduled task that takes care of dropping older records.
@Guest , you have a comment on your idea. Please answer it to help your idea to be promoted.
I suppose the closest realizations of this are transient tables in Snowflake (with syntax CREATE TRANSIENT TABLE ...)
And redis with expire command
So, if implement, I think should be considered the same SQL syntax as Snowflake with similar behavior with up to 1-day existence of stored data