Code Monkey home page Code Monkey logo

duckdb-kettle-plugin's Introduction

duckdb-kettle-plugin

A plugin for Pentaho Data Integration (Kettle) that adds support for DuckDB table input/output.

Build and Install Instructions

Prerequisites

The following should already be installed and configured on your local machine:

  • Maven, version 3+
  • Java JDK 11 (or OpenJDK)
  • This settings.xml in your /.m2 directory

Build the Plugin

Begin by cloning this repository locally.

git clone https://github.com/forgineer/duckdb-kettle-plugin.git

After cloning, review the pom.xml file for the project <version> tag and ensure it is the same version as the Pentaho Data Integration (Kettle) version you are using. This version can be verified under the Maven repository.

...
<groupId>com.forgineer</groupId>
<artifactId>duckdb-kettle-plugin</artifactId>
<!-- The version should reflect the PDI (Kettle version) -->
<!-- Ex: 9.4.0.0-343, 9.3.0.0-428, etc. -->
<version>9.4.0.0-343</version>
...

Also, review the DuckDB version and update it to the desired version.

...
<dependency>
    <groupId>org.duckdb</groupId>
    <artifactId>duckdb_jdbc</artifactId>
    <!-- The version should reflect JDBC driver used and vice versa -->
    <version>0.9.2</version>
</dependency>
...

Lastly, update the JDBC driver jar file name and version to match the pom.xml file. This file can be verified by downloading from Maven or directly from DuckDB.

@Override
public String[] getUsedLibraries() {
    // The version should match POM
    return new String[] {"duckdb_jdbc-0.9.2.jar"};
}

After reviewing and/or updating the above, proceed with packaging the jar file.

mvn package 

This will create a jar and zip file inside of the target directory:

  • duckdb-kettle-plugin-x.x.x.x-xxx.jar
  • duckdb-kettle-plugin-x.x.x.x-xxx.zip

Unpack the zip file into the plugins directory (\data-integration\plugins) of your local Kettle install. The zip file should include the plugin and necessary JDBC driver for DuckDB.

data-integration\
    plugins\
        duckdb-kettle-plugin-x.x.x.x-xxx\
            lib\
                duckdb_jdbc-x.x.x.jar
            duckdb-kettle-plugin-x.x.x.x-xxx.jar

Restart Kettle (Spoon).

Configure DuckDB Connection

DuckDB should now be available as a connection type from a table input or output step. Only the database name is required to create the DuckDB file.

DuckDB Connection

โœ‹ Use caution when using Kettle properties within your database name parameter. In recent testing, this has caused errors with the interpreted file path that Kettle generates.

duckdb-kettle-plugin's People

Contributors

forgineer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

lindapedreau

duckdb-kettle-plugin's Issues

Binary releases

Just a kind request to add binary releases for us lazy folk who don't want to build from source. Especially now that DuckDB v1 has been released. ๐Ÿ™

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.