IRubricatorInstance.RollbackData

Syntax

RollbackData(ToRevision: Integer);

Parameters

ToRevision. Revision key.

Description

The RollbackData method rolls back to time series database data in the specified revision.

Comments

RollbackData can be used to find and fix errors in data of the time series database.

During data rollback a new revision, containing factors and data with the ToRevision key, is created. Revisions between ToRevision and added revision are not deleted. If the ToRevision revision does not have any data points, but they appear in the following revisions, such points in the new revision get the Null value. If the ToRevision revision does not have any factors, they are added to the new revision as deleted ones.

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. The database must contain a revision with the 1 key. Also, add links to the Cubes and Metabase system assemblies.

    Sub UserProc;
    Var
        Mb: IMetabase;
        Rub: IRubricator;
        RubI: IRubricatorInstance;
        Rev: IRubricatorRevision;
    Begin
        Mb := MetabaseClass.Active;
        Rub := Mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
        RubI := (Rub As IMetabaseObject).Open(NullAs IRubricatorInstance;
        Rev := RubI.OpenRevision(Revision);
        RubI.RollbackData(1);
    End Sub UserProc;

After executing the example data of the time series database is rolled back to the revision with the 1 key.

See also:

IRubricatorInstance