IMetabaseUpdateDataObjectNode.BatchMode

Fore Syntax

BatchMode: ObjectUpdateDataBatchMode;

Fore.NET Syntax

BatchMode: Prognoz.Platform.Interop.Metabase.ObjectUpdateDataBatchMode;

Description

The BatchMode property determines a method of object data updating.

Comments

Update is available for tables, time series databases and MDM dictionaries.

Fore Example

Executing the example requires that the repository contains a time series database with the TSBD identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MBDesc: IMetabaseObjectDescriptor;
    MUpdate: IMetabaseUpdate;
    ObjNode: IMetabaseUpdateDataObjectNode;
Begin
    MB := MetabaseClass.Active;
    MBDesc := MB.ItemById("TSDB");
    MUpdate := MB.CreateUpdate;
    MUpdate.BoundType := MetabaseObjectUpdateBoundType.ById;
    MUpdate.Description := "Update time series database";
    ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    //Determine updated object
    ObjNode.Object := MBDesc;
    //Update parameters
    ObjNode.Label := MBDesc.Id;
    ObjNode.UpdatePart := MetabaseObjectUpdatePart.DataMetadata;
    ObjNode.BoundType := MetabaseObjectUpdateBoundType.ByKey;
    ObjNode.Method := MetabaseUpdateMethod.All;
    ObjNode.IncludeChildrenDependencies := TriState.OnOption;
    ObjNode.AllowExistingRubricatorUpdate := True;
    ObjNode.BatchMode := ObjectUpdateDataBatchMode.Override;
    //Save update
    MUpdate.SaveToFileNF("C:\Update.pefx");
End Sub UserProc;

On executing the example update file will be created. This update will include the TSDB time series database. If the created update is applied, data of all series are re-written and the name, identifier, parent folder and structure of embedded calendar are updated for time series database.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Add a link to the ForeSystem system assembly.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MBDesc: IMetabaseObjectDescriptor;
    MUpdate: IMetabaseUpdate;
    ObjNode: IMetabaseUpdateDataObjectNode;
Begin
    MB := Params.Metabase;
    MBDesc := MB.ItemById["TSDB"];
    MUpdate := MB.CreateUpdate();
    MUpdate.BoundType := MetabaseObjectUpdateBoundType.moubtById;
    MUpdate.Description := "Update time series database";
    ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.untDataObject) As IMetabaseUpdateDataObjectNode;
    //Determine updated object
    ObjNode.Object := MBDesc;
    //Update parameters
    ObjNode.Label := MBDesc.Id;
    ObjNode.UpdatePart := MetabaseObjectUpdatePart.moupDataMetadata;
    ObjNode.BoundType := MetabaseObjectUpdateBoundType.moubtByKey;
    ObjNode.Method := MetabaseUpdateMethod.mumAll;
    ObjNode.IncludeChildrenDependencies := TriState.tsOnOption;
    ObjNode.AllowExistingRubricatorUpdate := True;
    ObjNode.BatchMode := ObjectUpdateDataBatchMode.obupdabamoOverride;
    //Save update
    MUpdate.SaveToFileNF("C:\\Update.pefx");
End Sub;

See also:

IMetabaseUpdateDataObjectNode