Skip to content

Commit c8933c7

Browse files
committed
Updating documentation
1 parent 740f0f8 commit c8933c7

File tree

1 file changed

+66
-3
lines changed

1 file changed

+66
-3
lines changed

README.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,71 @@
1-
# KSQL JDBC Driver
1+
# KSQL 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)
22

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

5-
> *Work in progress
6+
In the current version, the driver connects to the [KSQL engine](https://www.confluent.io/product/ksql/) to
7+
perform queries to Kafka and then, the engine translates those requests to Kafka requests.
8+
9+
## Getting started
10+
11+
### Building from source ###
12+
13+
First of all, the KSQL lib has to be installed into your local repo (till now, there isn't a release available).
14+
15+
So, cloning the KSQL repo:
16+
17+
``git clone https://github.com/confluentinc/ksql.git && cd ksql && git checkout 0.1.x``
18+
19+
and installing it:
20+
21+
``mvn clean install -Dmaven.skip.test=true``
22+
23+
Once you did that, just have to clone the ksql-jdbc-driver repo and package it:
24+
25+
``git clone https://github.com/mmolimar/ksql-jdbc-driver.git && cd ksql-jdbc-driver``
26+
27+
``sbt clean package``
28+
29+
### Running tests ###
30+
31+
To run unit and integration tests, execute the following:
32+
33+
``sbt test it:test``
34+
35+
#### Coverage ###
36+
37+
To know the test coverage of the driver:
38+
39+
``sbt clean coverage test it:test coverageReport``
40+
41+
## Usage
42+
43+
As expected, the driver can be used as we are used to. So, in your application, register the driver (depending on
44+
your JVM), for example:
45+
46+
* ``java.sql.DriverManager.registerDriver(new com.github.mmolimar.ksql.jdbc.KsqlDriver)``
47+
48+
or
49+
50+
* ``Class.forName("com.github.mmolimar.ksql.jdbc.KsqlDriver")``
51+
52+
### Connection URL
53+
54+
The URL has the form ``jdbc:ksql://<ksql-engine>:<port>[?<property1>=<value>,<property2>=<value>...]``
55+
56+
where:
57+
58+
* **\<ksql-engine>**: represents the KSQL engine host.
59+
* **\<port>**: is the KSQL engine port.
60+
* **\<propertyN>**: are the custom client properties (optionals). Fow now, there is only one property and it's to
61+
set if the KSQL connection is secured or not. The property name is ``secured`` and its value is a boolean
62+
(``true``|``false``). Its default value is ``false``.
63+
64+
## TODO's
65+
66+
- [ ] Standalone mode: connecting directly to Kafka brokers.
67+
- [ ] Make the driver more compliant with the JDBC spec.
68+
- [ ] Enable a timeout when waiting for messages in a query.
669

770
## Contribute
871

0 commit comments

Comments
 (0)