Search in sources :

Example 16 with TableIndicator

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);
}
Also used : TableIndicator(org.talend.dataprofiler.core.model.TableIndicator) NamedColumnSet(orgomg.cwm.resource.relational.NamedColumnSet)

Example 17 with TableIndicator

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;
}
Also used : DbmsLanguage(org.talend.dq.dbms.DbmsLanguage) TableIndicator(org.talend.dataprofiler.core.model.TableIndicator) Expression(orgomg.cwm.objectmodel.core.Expression) Connection(org.talend.core.model.metadata.builder.connection.Connection) TableIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit) NamedColumnSet(orgomg.cwm.resource.relational.NamedColumnSet)

Example 18 with TableIndicator

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;
}
Also used : TableIndicator(org.talend.dataprofiler.core.model.TableIndicator) NamedColumnSet(orgomg.cwm.resource.relational.NamedColumnSet)

Aggregations

TableIndicator (org.talend.dataprofiler.core.model.TableIndicator)18 NamedColumnSet (orgomg.cwm.resource.relational.NamedColumnSet)8 ArrayList (java.util.ArrayList)7 TableIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit)5 Indicator (org.talend.dataquality.indicators.Indicator)5 Composite (org.eclipse.swt.widgets.Composite)4 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)4 Connection (org.talend.core.model.metadata.builder.connection.Connection)4 MouseAdapter (org.eclipse.swt.events.MouseAdapter)3 MouseEvent (org.eclipse.swt.events.MouseEvent)3 GridData (org.eclipse.swt.layout.GridData)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 TreeItem (org.eclipse.swt.widgets.TreeItem)3 ExpansionAdapter (org.eclipse.ui.forms.events.ExpansionAdapter)3 ExpansionEvent (org.eclipse.ui.forms.events.ExpansionEvent)3 CompositeIndicator (org.talend.dataprofiler.core.ui.editor.preview.CompositeIndicator)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 List (java.util.List)2 Map (java.util.Map)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2