跳到主要内容

基本模式 - JDBC 数据源

Importer le module JDBC de Trevas

<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.7.0</version>
</dependency>

Utilisation du module vtl-jdbc

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);
}
});