Coder Social home page Coder Social logo

ksql-jdbc-driver's Introduction

ksqlDB JDBC Driver Build StatusCoverage Status

ksql-jdbc-driver is a Type 4 Java Database Connectivity (JDBC) driver that provides standard access to Apache Kafka via JDBC API.

The driver connects to the ksqlDB engine then, the engine translates those requests to Kafka requests.

Getting started

Building from source

Just clone the ksql-jdbc-driver repo and package it:

git clone https://github.com/mmolimar/ksql-jdbc-driver.git && cd ksql-jdbc-driver

sbt clean package

If you want to build a fat jar containing both classes and dependencies -for instance, to use it in a JDBC client such as SQuirrel SQL or whichever-, type the following:

sbt clean assembly

Running tests

To run unit and integration tests, execute the following:

sbt test it:test

Coverage

To know the test coverage of the driver:

sbt clean coverage test it:test coverageReport

Usage

As expected, the driver can be used as we are used to. So, in your application, register the driver (depending on your JVM), for example:

  • java.sql.DriverManager.registerDriver(new com.github.mmolimar.ksql.jdbc.KsqlDriver)

or

  • Class.forName("com.github.mmolimar.ksql.jdbc.KsqlDriver")

Connection URL

The URL has the form jdbc:ksql://[<username>:<password>@]<ksql-engine>:<port>[?<property1>=<value>&<property2>=<value>...]

where:

  • <username>:<password>: optional username and password to log into ksqlDB.
  • <ksql-engine>: represents the ksqlDB engine host.
  • <port>: ksqlDB engine port.
  • <propertyN>: are the custom client properties (optionals). Available properties:
    • secured: sets if the ksqlDB connection is secured or not. It's a boolean (true|false) and its default value is false.
    • properties: enables to set in ksqlDB extra properties from the JDBC URL. It's a boolean (true|false) and its default value is false.
    • timeout: sets the max wait time between each message when receiving them. It's a long and its default value is 0 which means that is infinite.

TODO's

  • Standalone mode: connecting directly to Kafka brokers.
  • Make the driver more compliant with the JDBC spec.

Contribute

License

Released under the Apache License, version 2.0.

ksql-jdbc-driver's People

Contributors

mmolimar avatar d-thomson avatar mrnakumar avatar

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.