Sunday, December 22

    When migrating a MDS model from one database (or server) to another, the MDS Deployment Tool may report that the input mask is not valid. Input Masks in MDS represent the data-type of each field; think of a cell datatype in Excel.

    Each Input Mask is represented in the SQL database under the [tblList] table. This lists the available Input Masks available to users in MDS. To my knowledge, the only way to add Input Masks is to insert them into this table.

    During the migration of an MDS model using the Deploy Tool, the tool will attempt to check the inbound PKG file data against the [mdm].[udpMetadataSave] stored procedure. Here, we can identify that Microsoft begins checks against the inbound data as outlined in this CASE statement:

    CASE WHEN m.id IS NULL THEN
    N'MDSERR200013|The attribute cannot be saved. The model ID is not valid.' WHEN
    m.isadministrator = 0 THEN
    N'MDSERR120003|The user does not have permission or the object ID is not valid.'
    WHEN e.id IS NULL THEN
    N'MDSERR200014|The attribute cannot be saved. The entity ID is not valid.' WHEN
    synctarget.entity_id IS NOT NULL THEN
    N'MDSERR200215|The attribute cannot be saved. The entity is the target of a sync relationship.'
    WHEN a.inputmask_name IS NOT NULL AND im.optionid IS NULL THEN
    N'MDSERR200085|The attribute cannot be saved. The input mask is not valid.' end
    FROM @Attributes a
    -- Note: looking up model ids and entity ids in a batch here is more efficient that doing it one row at a time in updAttributeSave
    LEFT JOIN #usermodelaccess m ON (a.model_muid IS NOT NULL OR a.modelname IS NOT
    NULL) AND (a.model_muid IS NULL OR a.model_muid = m.muid) AND (a.modelname IS
    NULL OR a.modelname = m.name) LEFT JOIN mdm.tblentity e ON m.id = e.model_id AND
    (a.entity_muid IS NOT NULL OR a.entityname IS NOT NULL) AND (a.entity_muid IS
    NULL OR a.entity_muid = e.muid) AND (a.entityname IS NULL OR a.entityname =
    e.name) LEFT JOIN mdm.tblentity domainentity ON m.id = domainentity.model_id AND
    (a.domainentity_muid IS NOT NULL OR a.domainentityname IS NOT NULL) AND (a.domainentity_muid IS NULL
    OR a.domainentity_muid = domainentity.muid) AND (a.domainentityname IS NULL OR
    a.domainentityname = domainentity.name) LEFT JOIN @SyncTargetEntities synctarget ON e.id =
    synctarget.entity_id LEFT JOIN mdm.tbllist im ON im.listcode = 'lstInputMask'
    AND im.listoption = a.inputmask_name 

    Here, we can identify that the last CASE STATEMENT refers to the InputMask_Name and OptionID on the tblList table. Simply compare the following SELECT from the existing SQL MDS database against the new one and check to see if an Input Mask was inserted on the old environment and not carried over to the new one.

    SELECT *
    FROM [MDS].[mdm].[tblList]
    where listcode = 'lstInputMask'

    Comments are closed.