Search in sources :

Example 1 with TAzureStorageInputTableProperties

use of org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties in project components by Talend.

the class AzureStorageTableComponentsTest method testTAzureStorageInputTableProperties.

@Test
public void testTAzureStorageInputTableProperties() {
    TAzureStorageInputTableProperties p = new TAzureStorageInputTableProperties("test");
    p.connection.setupProperties();
    p.setupProperties();
    p.connection.setupLayout();
    p.schema.setupProperties();
    p.schema.setupLayout();
    p.setupLayout();
    p.afterUseFilterExpression();
}
Also used : TAzureStorageInputTableProperties(org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties) Test(org.junit.Test)

Example 2 with TAzureStorageInputTableProperties

use of org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties in project components by Talend.

the class AzureStorageTableSourceOrSinkTest method setUp.

@Before
public void setUp() throws Exception {
    sos = new AzureStorageTableSourceOrSink();
    props = new TAzureStorageInputTableProperties("test");
    props.setupProperties();
}
Also used : TAzureStorageInputTableProperties(org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties) Before(org.junit.Before)

Example 3 with TAzureStorageInputTableProperties

use of org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties in project components by Talend.

the class TAzureStorageOuputTableTestIT method createReader.

@SuppressWarnings("rawtypes")
public BoundedReader createReader(String table, String combinedFilter, boolean useMappings) {
    TAzureStorageInputTableProperties props = new TAzureStorageInputTableProperties("tests");
    props = (TAzureStorageInputTableProperties) setupConnectionProperties((AzureStorageProvideConnectionProperties) props);
    props.tableName.setValue(table);
    props.useFilterExpression.setValue(true);
    if (useMappings) {
        props.schema.schema.setValue(getMappingSchema());
        props.nameMapping.schemaColumnName.setValue(schemaMappings);
        props.nameMapping.entityPropertyName.setValue(propertyMappings);
    } else {
        props.schema.schema.setValue(getDynamicSchema());
        props.nameMapping.schemaColumnName.setValue(null);
        props.nameMapping.entityPropertyName.setValue(null);
    }
    AzureStorageTableSource source = new AzureStorageTableSource();
    source.initialize(null, props);
    source.validate(null);
    return source.createReader(null);
}
Also used : TAzureStorageInputTableProperties(org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties) AzureStorageTableSource(org.talend.components.azurestorage.table.runtime.AzureStorageTableSource)

Example 4 with TAzureStorageInputTableProperties

use of org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties in project components by Talend.

the class AzureStorageTableReaderTest method setUp.

@Before
public void setUp() throws Exception {
    container = new RuntimeContainerMock();
    properties = new TAzureStorageInputTableProperties(PROP_ + "InputTable");
    properties.setupProperties();
    // valid fake connection
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    properties.tableName.setValue("testTable");
    properties.filterExpression.column.setValue(new ArrayList<String>());
    properties.filterExpression.fieldType.setValue(new ArrayList<String>());
    properties.filterExpression.function.setValue(new ArrayList<String>());
    properties.filterExpression.operand.setValue(new ArrayList<String>());
    properties.filterExpression.predicate.setValue(new ArrayList<String>());
    properties.filterExpression.column.getValue().add("PartitionKey");
    properties.filterExpression.fieldType.getValue().add(SupportedFieldType.STRING.name());
    properties.filterExpression.function.getValue().add(Comparison.EQUAL.name());
    properties.filterExpression.operand.getValue().add("Departement");
    properties.filterExpression.predicate.getValue().add(Predicate.AND.name());
    source = new AzureStorageTableSource();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageInputTableProperties(org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)

Aggregations

TAzureStorageInputTableProperties (org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties)4 Before (org.junit.Before)1 Test (org.junit.Test)1 RuntimeContainerMock (org.talend.components.azurestorage.RuntimeContainerMock)1 AzureStorageTableSource (org.talend.components.azurestorage.table.runtime.AzureStorageTableSource)1 TAzureStorageConnectionProperties (org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)1