Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmolimar/ksql-jdbc-driver
JDBC driver for Apache Kafka
https://github.com/mmolimar/ksql-jdbc-driver
apache-kafka confluent driver jdbc kafka ksql ksqldb
Last synced: about 2 months ago
JSON representation
JDBC driver for Apache Kafka
- Host: GitHub
- URL: https://github.com/mmolimar/ksql-jdbc-driver
- Owner: mmolimar
- License: apache-2.0
- Created: 2017-10-04T01:54:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-01T04:28:10.000Z (about 2 years ago)
- Last Synced: 2024-02-04T11:00:21.963Z (5 months ago)
- Topics: apache-kafka, confluent, driver, jdbc, kafka, ksql, ksqldb
- Language: Scala
- Homepage:
- Size: 288 KB
- Stars: 88
- Watchers: 15
- Forks: 19
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-kafka - ksql-jdbc-driver
- awesome-kafka - KSQL JDBC Driver
- awesome-kafka - ksql-jdbc-driver
README
# ksqlDB JDBC Driver [![Build Status](https://travis-ci.org/mmolimar/ksql-jdbc-driver.svg?branch=master)](https://travis-ci.org/mmolimar/ksql-jdbc-driver)[![Coverage Status](https://coveralls.io/repos/github/mmolimar/ksql-jdbc-driver/badge.svg?branch=master)](https://coveralls.io/github/mmolimar/ksql-jdbc-driver?branch=master)
**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](https://ksqldb.io/) 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](http://squirrel-sql.sourceforge.net/) 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://[:@]:[?=&=...]``
where:
* **\:\**: optional username and password to log into ksqlDB.
* **\**: represents the ksqlDB engine host.
* **\**: ksqlDB engine port.
* **\**: 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
- Source Code: https://github.com/mmolimar/ksql-jdbc-driver
- Issue Tracker: https://github.com/mmolimar/ksql-jdbc-driver/issues## License
Released under the Apache License, version 2.0.