use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCDatasetTestIT method testGetSampleWithoutDesignSchema.
@Test
public void testGetSampleWithoutDesignSchema() {
JDBCDatasetProperties dataset = createDatasetProperties(false);
getSampleAction(dataset);
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCDatasetOracleTestIT method testGetSchema.
@Ignore
@Test
public void testGetSchema() {
JDBCDatasetProperties dataset = createDatasetProperties();
JDBCDatasetRuntime runtime = new JDBCDatasetRuntime();
runtime.initialize(null, dataset);
Schema schema = runtime.getSchema();
Assert.assertNotNull(schema);
Assert.assertEquals(2, schema.getFields().size());
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCInputTestIT method createCommonJDBCInputProperties.
private JDBCInputProperties createCommonJDBCInputProperties(JDBCInputDefinition definition) {
JDBCDatastoreDefinition datastore_def = new JDBCDatastoreDefinition();
JDBCDatastoreProperties datastore_props = new JDBCDatastoreProperties("datastore");
datastore_props.dbTypes.setValue("DERBY");
datastore_props.afterDbTypes();
datastore_props.jdbcUrl.setValue(allSetting.getJdbcUrl());
datastore_props.userId.setValue(allSetting.getUsername());
datastore_props.password.setValue(allSetting.getPassword());
JDBCDatasetProperties dataset = (JDBCDatasetProperties) datastore_def.createDatasetProperties(datastore_props);
dataset.sql.setValue(DBTestUtils.getSQL(tablename));
updateSchema(dataset);
JDBCInputProperties properties = (JDBCInputProperties) definition.createRuntimeProperties();
properties.setDatasetProperties(dataset);
return properties;
}
Aggregations