Search in sources :

Example 1 with SemanticCategoryEnum

use of org.talend.dataquality.semantic.classifier.SemanticCategoryEnum in project data-prep by Talend.

the class StandardizeInvalidTest method should_accept_column.

@Test
public void should_accept_column() {
    // a column with semantic
    SemanticCategoryEnum semantic = SemanticCategoryEnum.COUNTRY;
    List<SemanticDomain> semanticDomainLs = new ArrayList<>();
    semanticDomainLs.add(new SemanticDomain("COUNTRY", "Country", 0.85f));
    ColumnMetadata column = ColumnMetadata.Builder.column().id(0).name("name").type(Type.STRING).semanticDomains(semanticDomainLs).domain(semantic.name()).build();
    assertTrue(action.acceptField(column));
}
Also used : SemanticCategoryEnum(org.talend.dataquality.semantic.classifier.SemanticCategoryEnum) ColumnMetadata(org.talend.dataprep.api.dataset.ColumnMetadata) SemanticDomain(org.talend.dataprep.api.dataset.statistics.SemanticDomain) Test(org.junit.Test) AbstractMetadataBaseTest(org.talend.dataprep.transformation.actions.AbstractMetadataBaseTest)

Aggregations

Test (org.junit.Test)1 ColumnMetadata (org.talend.dataprep.api.dataset.ColumnMetadata)1 SemanticDomain (org.talend.dataprep.api.dataset.statistics.SemanticDomain)1 AbstractMetadataBaseTest (org.talend.dataprep.transformation.actions.AbstractMetadataBaseTest)1 SemanticCategoryEnum (org.talend.dataquality.semantic.classifier.SemanticCategoryEnum)1