Skip to content

Commit d0df851

Browse files
Merge pull request bryanyang0528#48 from kaiwaehner/master
Improved README
2 parents dd78808 + b5a801d commit d0df851

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.rst

+17-7
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,26 @@ Or
2929
Getting Started
3030
---------------
3131

32+
Setup for KSQL
33+
~~~~~~~~~~~~~~~
34+
3235
This is the GITHUB page of KSQL. https://github.com/confluentinc/ksql
3336

34-
Setup
35-
~~~~~
37+
If you have installed open source Confluent CLI (e.g. by installing Confluent Open Source or Enterprise Platform), you can start KSQL and its dependencies with one single command:
38+
39+
.. code:: bash
40+
41+
confluent start ksql-server
42+
43+
Setup for ksql-python API
44+
~~~~~~~~~~~~~~~~~~~~~~~~~
3645

3746
- Setup for the KSQL API:
3847

3948
.. code:: python
4049
4150
from ksql import KSQLAPI
42-
client = KSQLAPI('http://ksql-server:8080')
51+
client = KSQLAPI('http://ksql-server:8088')
4352
4453
- Setup for KSql API with logging enabled:
4554

@@ -82,13 +91,14 @@ It will execute sql query and keep listening streaming data.
8291
8392
client.query('select * from table1')
8493
85-
This command returns a generator. It can be printed e.g. by reading its values via `next(query)` or a for loop:
94+
This command returns a generator. It can be printed e.g. by reading its values via `next(query)` or a for loop. Here is a complete example:
8695

8796
.. code:: python
8897
89-
for item in query:
90-
print(item)
91-
98+
from ksql import KSQLAPI
99+
client = KSQLAPI('http://localhost:8088')
100+
query = client.query('select * from table1')
101+
for item in query: print(item)
92102
93103
- Example Response
94104

0 commit comments

Comments
 (0)