use of org.talend.dataprofiler.core.model.TableIndicator in project tdq-studio-se by Talend.
the class AnalysisTableTreeViewer method dropTables.
@Override
public void dropTables(List<NamedColumnSet> sets, int index) {
int size = sets.size();
TableIndicator[] tIndicators = new TableIndicator[size];
for (int i = 0; i < size; i++) {
NamedColumnSet set = sets.get(i);
TableIndicator tableIndicator = TableIndicator.createTableIndicatorWithRowCountIndicator(set);
tIndicators[i] = tableIndicator;
}
this.addElements(tIndicators);
}
use of org.talend.dataprofiler.core.model.TableIndicator in project tdq-studio-se by Talend.
the class AnalysisTableTreeViewer method isExpressionNull.
private String isExpressionNull(TreeItem item) {
String expressContent = null;
TableIndicatorUnit indicatorUnit = (TableIndicatorUnit) item.getData(INDICATOR_UNIT_KEY);
TableIndicator tableIndicator = (TableIndicator) item.getData(TABLE_INDICATOR_KEY);
NamedColumnSet set = tableIndicator.getColumnSet();
Connection dataprovider = ConnectionHelper.getTdDataProvider(ColumnSetHelper.getParentCatalogOrSchema(set));
DbmsLanguage dbmsLang = DbmsLanguageFactory.createDbmsLanguage(dataprovider);
Expression expression = dbmsLang.getInstantiatedExpression(indicatorUnit.getIndicator());
if (expression != null) {
expressContent = expression.getBody();
}
return expressContent;
}
use of org.talend.dataprofiler.core.model.TableIndicator in project tdq-studio-se by Talend.
the class AbstractPredefinedTableAnalysisAction method composePredefinedTableIndicator.
protected TableIndicator[] composePredefinedTableIndicator(IndicatorEnum[] allowedEnum) {
NamedColumnSet[] tablesAndViews = getTablesAndViews();
TableIndicator[] predefinedTableIndicator = new TableIndicator[tablesAndViews.length];
for (int i = 0; i < tablesAndViews.length; i++) {
NamedColumnSet tableOrView = tablesAndViews[i];
TableIndicator tableIndicator = new TableIndicator(tableOrView);
predefinedTableIndicator[i] = tableIndicator;
}
return predefinedTableIndicator;
}
Aggregations