Skip to content

A JDBC driver for running alternative JVM language scripts or console-oriented programs

License

Notifications You must be signed in to change notification settings

peter-gergely-horvath/dyna4jdbc

Folders and files

NameName
Last commit message
Last commit date
Dec 25, 2016
Sep 5, 2017
Jan 6, 2017
Mar 18, 2018
Apr 2, 2016
Feb 21, 2017
Jun 7, 2016
Jun 7, 2016
Mar 11, 2016
Jul 4, 2017
Sep 17, 2017

Repository files navigation

dyna4JDBC

A JDBC driver for running alternative JVM language scripts and external programs.

Introduction

dyna4JDBC is a JDBC driver, that allows running alternative JVM language scripts (Groovy, JavaScript, Scala, Jython, Clojure, BeanShell, R (Renjin), JRuby etc.) or external console-oriented programs via the JDBC API.

Mainly targeted at allowing JDBC-enabled business intelligence applications to run various scripts instead of SQL easily, dyna4JDBC captures and parses the output of scripts/external programs and presents that as a standard JDBC ResultSet, allowing the output to be processed further for various purposes like building complex reports quickly and analysis with other tools.

Documentation

For further information, please check out the

Sample

NOTE: This is just a sample - the project's primary goal is empowering Java Reporting and ETL applications to call dynamic script langauges through the JDBC API, and NOT programmatic usage.

package sample;

import java.sql.*;

public class HelloWorldSample {

    public static void main(String[] args) throws SQLException {

        String url = "jdbc:dyna4jdbc:scriptengine:JavaScript";

        try (Connection connection = DriverManager.getConnection(url)) {

            try (Statement statement = connection.createStatement()) {

                statement.executeUpdate(" var msg = 'Hello World'; ");
                try (ResultSet resultSet = statement.executeQuery(" print(msg); ")) {
                    while (resultSet.next()) {
                        String string = resultSet.getString(1);

                        System.out.println(string);
                    }
                }

            }
        }
    }
}

Download

Please visit Maven Central or the the release download section to download the binary version of dyna4jdbc JDBC driver.

Build Status

Build Status

Continuous integration platform is provided by Travis CI