use of org.talend.dataquality.rules.KeyDefinition in project tdq-studio-se by Talend.
the class MatchingKeySection method getCurrentMatchKeyColumn.
/**
* find the current columns which has been selected as match key on the current Tab(Match rule)
*
* @return
*/
public List<String> getCurrentMatchKeyColumn() {
List<String> columnAsKey = new ArrayList<String>();
MatchRule matchRule;
try {
matchRule = getCurrentMatchRule();
} catch (Exception e) {
return columnAsKey;
}
for (KeyDefinition keyDef : matchRule.getMatchKeys()) {
columnAsKey.add(keyDef.getColumn());
}
return columnAsKey;
}
use of org.talend.dataquality.rules.KeyDefinition in project tdq-studio-se by Talend.
the class MatchRuleAnlaysisUtils method blockingKeyDataConvert.
/**
* DOC yyin Comment method "ruleMatcherConvert".
*
* @param blockKeyDef
* @param columnMap
* @return
*/
public static List<Map<String, String>> blockingKeyDataConvert(List<KeyDefinition> blockKeyDefList) {
List<Map<String, String>> resultListData = new ArrayList<Map<String, String>>();
for (KeyDefinition keyDef : blockKeyDefList) {
BlockKeyDefinition blockKeydef = (BlockKeyDefinition) keyDef;
String column = blockKeydef.getColumn();
String preAlgo = blockKeydef.getPreAlgorithm().getAlgorithmType();
String preAlgoValue = blockKeydef.getPreAlgorithm().getAlgorithmParameters();
String algorithm = blockKeydef.getAlgorithm().getAlgorithmType();
String algorithmValue = blockKeydef.getAlgorithm().getAlgorithmParameters();
String postAlgo = blockKeydef.getPostAlgorithm().getAlgorithmType();
String postAlgValue = blockKeydef.getPostAlgorithm().getAlgorithmParameters();
Map<String, String> blockKeyDefMap = AnalysisRecordGroupingUtils.getBlockingKeyMap(column, preAlgo, preAlgoValue, algorithm, algorithmValue, postAlgo, postAlgValue);
resultListData.add(blockKeyDefMap);
}
return resultListData;
}
Aggregations