02-21-2024
03:22 AM
- last edited on
02-21-2024
05:36 AM
by
JackLacava
Does anybody know in which table are Transformation rules mapping stored?
Thanks
Solved! Go to Solution.
02-22-2024 04:56 AM
This is the query I use for exporting maps (this does not include logical operators or expressions)
SELECT
Case Ruletype
WHEN 1 THEN 'OneToOne'
WHEN 2 THEN 'Composite'
WHEN 3 THEN 'Range'
WHEN 4 THEN 'List'
WHEN 5 THEN 'Mask'
END AS MapType
,RuleName
,RuleDescription
,Case Ruletype
WHEN 1 THEN RuleName
ELSE RuleExpression
END AS Source
,OutputValue AS Target
,Case FlipSign WHEN 0 THEN 'False' ELSE 'True' END AS FlipSign
,ExecutionOrder AS [Order]
FROM StageRuleGroups
INNER JOIN StageRules ON StageRules.RulesGroupKey = StageRuleGroups.UniqueID
WHERE RuleGroupName = 'MyRuleName'
ORDER BY RuleType, ExecutionOrder, RuleName
02-21-2024 04:14 AM
The maps are held in the table StageRules.
02-21-2024 05:34 PM
Often joined with StageRuleGroups, e.g., to get a list:
SELECT
Case Ruletype
WHEN 1 THEN RuleName -- 1:1
WHEN 2 THEN RuleExpression -- composite
WHEN 5 THEN RuleExpression -- mask
END AS Source,
OutputValue AS Target
FROM StageRuleGroups
INNER JOIN StageRules ON StageRules.RulesGroupKey = StageRuleGroups.UniqueID
WHERE RuleGroupName = 'MyRuleName'
Just grabbed this from somewhere without checking but it looks right!
02-21-2024 10:53 PM
Hi Daniel,
Thank you for the reply, looks good to me.
02-22-2024 04:56 AM
This is the query I use for exporting maps (this does not include logical operators or expressions)
SELECT
Case Ruletype
WHEN 1 THEN 'OneToOne'
WHEN 2 THEN 'Composite'
WHEN 3 THEN 'Range'
WHEN 4 THEN 'List'
WHEN 5 THEN 'Mask'
END AS MapType
,RuleName
,RuleDescription
,Case Ruletype
WHEN 1 THEN RuleName
ELSE RuleExpression
END AS Source
,OutputValue AS Target
,Case FlipSign WHEN 0 THEN 'False' ELSE 'True' END AS FlipSign
,ExecutionOrder AS [Order]
FROM StageRuleGroups
INNER JOIN StageRules ON StageRules.RulesGroupKey = StageRuleGroups.UniqueID
WHERE RuleGroupName = 'MyRuleName'
ORDER BY RuleType, ExecutionOrder, RuleName
02-22-2024 06:10 AM
Thank you Marcus this will work for me.