Search in sources :

Example 1 with AzureStorageTableSource

use of org.talend.components.azurestorage.table.runtime.AzureStorageTableSource in project components by Talend.

the class AzureStorageTableBaseTestIT method createBoundedReader.

@Override
@SuppressWarnings("unchecked")
public <T> BoundedReader<T> createBoundedReader(ComponentProperties props) {
    AzureStorageTableSource source = new AzureStorageTableSource();
    source.initialize(null, props);
    source.validate(null);
    return source.createReader(null);
}
Also used : AzureStorageTableSource(org.talend.components.azurestorage.table.runtime.AzureStorageTableSource)

Example 2 with AzureStorageTableSource

use of org.talend.components.azurestorage.table.runtime.AzureStorageTableSource 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)

Aggregations

AzureStorageTableSource (org.talend.components.azurestorage.table.runtime.AzureStorageTableSource)2 TAzureStorageInputTableProperties (org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties)1