IRdsImportSchema.DisableUniqueKeys

Syntax

DisableUniqueKeys: Boolean;

Description

The DisableUniqueKeys property determines whether check of downloaded data against all custom unique keys of a dictionary is disabled.

Comments

Available values:

The DisableUniqueKeys property is relevant only for repositories that work with Oracle DBMS. In repositories that work with MSSQL DBMS import is executed without check of custom unique keys in the MDM repository, it means that DisableUniqueKeys = True.

Example

Executing the example requires a table with the TBL_IMP identifier. There must also be the MDM repository with the RDS_REPO identifier containing the MDM dictionary with the IMPORT identifier. Identifiers and field types of the TBL_IMP table and of the IMPORT dictionary match.

Add links to the Metabase, Rds, Db system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Import: IRdsImportSchemas;
    SchemaImport: IRdsImportSchema;
    Attrs: IRdsAttributes;
    TableObj: IMetabaseObjectDescriptor;
    Table: ITable;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("IMPORT", MB.ItemById("RDS_REPO").Key).Edit;
    Dict := MObj As IRdsDictionary;
    Attrs := Dict.Attributes;
    Import := Dict.ImportSchemas;
    SchemaImport := Import.Add;
    SchemaImport.Id := "Import1";
    SchemaImport.Name := Import scheme #1;
    SchemaImport.Incremental := True;
    SchemaImport.DisableUniqueKeys := True;
    SchemaImport.Mappings(Attrs.Key).FieldName := "Key";
    SchemaImport.Mappings(Attrs.Name).FieldName := "Name";
    SchemaImport.Mappings(Attrs.Order).FieldName := "Ord";
    SchemaImport.Mappings(Attrs.ParentKey).FieldName := "Parent_key";
    TableObj := MB.ItemById("TBL_IMP");
    Table := TableObj.Bind As ITable;
    SchemaImport.TableObject := TableObj;
    SchemaImport.TableName := Table.NativeName;
    MObj.Save;
End Sub UserProc;

After executing the example a new import scheme is created in the MDM dictionary. Attribute values of the IMPORT dictionary are imported from same-name fields of the TBL_IMP table. Loaded data is not checked against all custom unique keys.

See also:

IRdsImportSchema