Basic mode - JDBC source
Import Trevas JDBC module
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.7.0</version>
</dependency>
Usage of the vtl-jdbc
module
connection = DriverManager.getConnection(...);
Statement statement = connection.createStatement();
JDBCDataset jdbcDataset = new JDBCDataset(() -> {
try {
return statement.executeQuery("select * from ds1;");
} catch (SQLException se) {
throw new RuntimeException(se);
}
});