mcb2003

mcb2003

0p

1 comments posted · 0 followers · following 0

12 years ago @ Matt Masson's Blog - Bulk Loading into MDS ... · 1 reply · +2 points

I also find it helpful, after all data has been staged, to call the stored procedure that validates the model. Otherwise, as I recall, new validation errors don't show up.

I obtain the model information using a query like this (in an Execute SQL task)
SELECT 1 AS User_ID, sv.Model_ID, sv.Name AS Version_Name, sv.ID AS Version_ID
FROM mdm.viw_SYSTEM_SCHEMA_VERSION AS sv INNER JOIN
mdm.viw_SYSTEM_SCHEMA_VERSION_FLAGS AS svf ON sv.VersionFlag_ID = svf.ID
WHERE (sv.Model_Name = ?) AND (svf.Name = ?)

The actual call to the stored procedure (another Execute SQL task -- I often use the results of the first query for staging as well) looks like:
EXEC mdm.udpValidateModel @User_ID = ?, @Model_ID = ?, @Version_ID = ?, @Status_ID = 1

I didn't find a way to obtain the user ID other than to hard code it. It works for now.