-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ksqldb delele artefacts delete order, first tables then streams,…
… the reverse of the creation (#392) * in ksql artefact manager, compile the list of artefacts to be orders in reverse order as sorted before this way tables will go first and then streams * add sample example test for ksql create and delete with dependencies
- Loading branch information
Showing
8 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
context: "context" | ||
projects: | ||
- name: "foo" | ||
ksql: | ||
artefacts: | ||
streams: | ||
- path: "ksql/riderlocations.sql" | ||
name: "riderLocations" | ||
- path: "ksql/orders.sql" | ||
name: "ordersStream" | ||
tables: | ||
- path: "ksql/users.sql" | ||
name: "users" | ||
- path: "ksql/moreOrders.sql" | ||
name: "moreOrders" | ||
topics: | ||
- name: "foo" | ||
config: | ||
replication.factor: "1" | ||
num.partitions: "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE OR REPLACE TABLE MOREORDERS AS | ||
SELECT STRUCT(TransactionMainId := TransactionId, TransactionMainDate := TransactionMainDate) as TX, COLLECT_LIST(Number)[1] as Number, COLLECT_LIST(Date)[1] as Date, COLLECT_LIST(State)[1] as State | ||
FROM ORDERSSTREAM | ||
GROUP BY STRUCT(TransactionMainId := TransactionId, TransactionMainDate := TransactionMainDate) | ||
EMIT CHANGES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE OR REPLACE STREAM ordersStream ( | ||
transactionId BIGINT KEY, | ||
transactionMainDate BIGINT KEY, | ||
number BIGINT, | ||
date BIGINT, | ||
state VARCHAR | ||
) WITH ( | ||
KAFKA_TOPIC = 'more-orders-avro', | ||
KEY_FORMAT = 'JSON', | ||
VALUE_FORMAT = 'JSON', | ||
PARTITIONS=1, | ||
REPLICAS=1 | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
CREATE STREAM riderLocations (profileId VARCHAR, latitude DOUBLE, longitude DOUBLE) WITH (kafka_topic='locations', value_format='json', partitions=1); | ||
CREATE OR REPLACE STREAM riderLocations (profileId VARCHAR, latitude DOUBLE, longitude DOUBLE) WITH (kafka_topic='locations', value_format='json', partitions=1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
topology.state.cluster.enabled=false | ||
platform.server.ksql.url=http://localhost:8088 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters