Skip to content

Commit 5e5100b

Browse files
Merge pull request #71 from oslabs-beta/dev
Dev
2 parents 1fa9441 + 740c964 commit 5e5100b

31 files changed

+295
-5419
lines changed

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ jobs:
3131
- uses: actions/checkout@v3
3232

3333
- name: Start Containers
34-
run: docker-compose -f "./ksqljs/docker-compose.yml" up -d --build
34+
run: docker-compose -f "./ksQlient/docker-compose.yml" up -d --build
3535

3636
- name: Install node
3737
uses: actions/setup-node@v1
3838
with:
3939
node-version: 16.x
4040

4141
- name: Install dependencies
42-
run: npm install --prefix "./ksqljs"
42+
run: npm install --prefix "./ksQlient"
4343

4444
- name: Sleep for 30 seconds
4545
run: sleep 30s
4646
shell: bash
4747

4848
- name: Run tests
49-
run: npm run test --prefix "./ksqljs"
49+
run: npm run test --prefix "./ksQlient"
5050

5151
- name: Stop containers
5252
if: always()
53-
run: docker-compose -f "./ksqljs/docker-compose.yml" down
53+
run: docker-compose -f "./ksQlient/docker-compose.yml" down

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
node-version: 16
1515
registry-url: https://registry.npmjs.org/
1616
- name: Publish
17-
working-directory: ./ksqljs
17+
working-directory: ./ksQlient
1818
run: npm publish --access public
1919
env:
2020
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

README.md

Lines changed: 14 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,25 @@
1-
# ksqlDB-JS
1+
# ksqlSuite
22

33
<div align="center">
44

5-
<a href="https://github.com/oslabs-beta/ksqljs"><img src="https://img.shields.io/badge/license-MIT-blue"/></a>
5+
<div>
6+
<img src="./ksqljs/static/light.png" alt="logo" width="230" style='padding-right:15px'/>
7+
<img src="./ksqLight/src/static/ksqlight_raleway.png" alt="logo" width="245"/>
8+
</div>
9+
<!-- <a href="https://github.com/oslabs-beta/ksqljs"><img src="https://img.shields.io/badge/license-MIT-blue"/></a>
610
<a href="https://github.com/oslabs-beta/ksqljs/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/oslabs-beta/ksqljs"></a>
711
<a href="https://github.com/oslabs-beta/ksqljs/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/oslabs-beta/ksqljs"></a>
8-
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/oslabs-beta/ksqljs">
12+
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/oslabs-beta/ksqljs"> -->
913

10-
<p align="center"> <strong>A native Node.js client for ksqlDB</strong></p>
11-
</div>
14+
<p align="center" style='font-size:13pt'> <strong>A Node.js client and a metric visualizer for ksqlDB</strong></p>
15+
</div>
1216

13-
## Table of Contents
17+
## About
1418

15-
- [About the project](#about)
16-
- [Getting Started](#getting-started)
17-
- [Usage](#usage)
18-
- [Features](#features)
19-
- [Developers](#developers)
20-
- [Contributions](#contributions)
21-
- [License](#license)
19+
Need to run stream processing workloads on ksqlDB in Node.JS? Our lightweight **Node.js client** can help.
2220

23-
## <a name="about"></a> About the Project
21+
Check out [ksQlient](./ksqljs/)
2422

25-
ksqlDB-JS - a ksqlDB client for Node.js
23+
Need to visualize ksqlDB query metrics to diagnose bottleneck issues? Try out our **metric visualizer**.
2624

27-
### Prerequisites
28-
29-
> Node.js - https://nodejs.org/en/
30-
>
31-
> ksqlDB - https://ksqldb.io/
32-
>
33-
> Docker (for tests) -https://www.docker.com/
34-
35-
## <a name="getting-started"></a> Getting Started
36-
37-
Install package from Node package manager
38-
39-
```
40-
npm install ksqldb-js
41-
```
42-
43-
### <a name="usage"></a> Usage
44-
45-
Create a client in the application file:
46-
47-
```
48-
const ksqldb = require('ksqldb-js');
49-
const client = new ksqldb({ksqldbURL: '<url to ksqlDB server>'})
50-
```
51-
52-
To run tests initiate Docker containers included in yaml file:
53-
54-
```
55-
docker-compose up
56-
npm test
57-
```
58-
59-
## <a name="features"></a> Features
60-
61-
- #### Create a pull query
62-
63-
```
64-
client.pull("SELECT * FROM myTable;");
65-
```
66-
67-
- #### Create a push query
68-
69-
```
70-
client.push('SELECT * FROM myTable EMIT CHANGES;',
71-
(data) => {
72-
console.log(data);
73-
});
74-
```
75-
76-
- #### Terminate persistent query
77-
e.g. a push query
78-
79-
```
80-
client.terminate(queryId);
81-
```
82-
83-
- #### Insert rows of data into a stream
84-
85-
```
86-
client.insertStream('myTable', [
87-
{ "name": "jack", "email": "123@mail.com", "age": 25 },
88-
{ "name": "john", "email": "456@mail.com", "age": 20 }
89-
]);
90-
```
91-
92-
- #### List streams/queries
93-
94-
```
95-
client.ksql('LIST STREAMS;');
96-
```
97-
98-
- #### Create table/streams
99-
100-
```
101-
client.createStream('testStream',
102-
columnsType = ['name VARCHAR', 'email varchar', 'age INTEGER'],
103-
topic = 'testTopic',
104-
value_format = 'json',
105-
partitions = 1);
106-
```
107-
108-
- #### For custom SQL statements including complex joins use the .ksql method
109-
110-
```
111-
client.ksql('DROP STREAM IF EXISTS testStream;');
112-
```
113-
114-
- #### SQL Query builder
115-
116-
Please use the built-in query builder to parametrize any SQL query to avoid SQL injection.
117-
118-
```
119-
const builder = new queryBuilder();
120-
const query = 'SELECT * FROM table WHERE id = ? AND size = ?';
121-
const finishedQuery = builder.build(query, 123, "middle");
122-
123-
client.ksql(finishedQuery);
124-
```
125-
126-
- #### Create table as
127-
128-
Generating a materialized view that can be
129-
130-
```
131-
client.createTableAs('testTable', 'sourceStream', selectArray = ['name', 'LATEST_BY_OFFSET(age) AS recentAge'],
132-
propertiesObj = {topic:'newTestTopic'},
133-
conditionsObj = {WHERE: 'age >= 21', GROUP_BY: 'name'});
134-
```
135-
136-
- #### Create stream as
137-
138-
```
139-
client.createStreamAs('testStream', selectColumns = ['name', 'age'], 'sourceStream',
140-
propertiesObj = {
141-
kafka_topic: 'testTopic',
142-
value_format: 'json',
143-
partitions: 1
144-
},
145-
conditions = 'age > 50');
146-
```
147-
148-
- #### Pull from to
149-
150-
Pull stream data between two time points
151-
152-
```
153-
client.pullFromTo('TESTSTREAM', 'America/Los_Angeles',
154-
from = ['2022-01-01', '00', '00', '00'],
155-
to = ['2022-01-01', '00', '00', '00']);
156-
```
157-
158-
- #### Troubleshooting methods (.inspectServerStatus, .inspectQueryStatus, .inspectClusterStatus )
159-
160-
## <a name="developers"></a> Developers
161-
162-
- [Javan Ang](https://github.com/javanang)
163-
- [Gerry Bong](https://github.com/ggbong734)
164-
- [Jonathan Luu](https://github.com/jonathanluu17)
165-
- [Michael Snyder](https://github.com/MichaelCSnyder)
166-
- [Matthew Xing](https://github.com/Aengil)
167-
168-
## <a name="contributions"></a> Contributions
169-
170-
Contributions to the code, examples, documentation, etc. are very much appreciated.
171-
172-
- Please report issues and bugs directly in this [GitHub project](https://github.com/oslabs-beta/ksqljs/issues).
173-
174-
## <a name="license"></a> License
175-
176-
This product is licensed under the MIT License - see the LICENSE.md file for details.
177-
178-
This is an open source product.
179-
180-
This product is accelerated by OS Labs.
181-
182-
ksqlDB is licensed under the [Confluent Community License](https://github.com/confluentinc/ksql/blob/master/LICENSE).
183-
184-
_Apache, Apache Kafka, Kafka, and associated open source project names are trademarks of the [Apache Software Foundation](https://www.apache.org/)_.
25+
Check out [ksqLight](./ksqLight/)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)