-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
227 additions
and
196 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
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,28 @@ | ||
CREATE SINK mqtt_sink | ||
FROM | ||
personnel | ||
WITH | ||
( | ||
connector='mqtt', | ||
url='tcp://mqtt-server', | ||
topic= 'test', | ||
type = 'append-only', | ||
retain = 'true', | ||
qos = 'at_least_once', | ||
) FORMAT PLAIN ENCODE JSON ( | ||
force_append_only='true', | ||
); | ||
|
||
INSERT INTO | ||
personnel | ||
VALUES | ||
(1, 'Alice'), | ||
(2, 'Bob'), | ||
(3, 'Tom'), | ||
(4, 'Jerry'), | ||
(5, 'Araminta'), | ||
(6, 'Clover'), | ||
(7, 'Posey'), | ||
(8, 'Waverly'); | ||
|
||
FLUSH; |
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
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,14 @@ | ||
import sys | ||
import subprocess | ||
|
||
|
||
output = subprocess.Popen(["docker", "compose", "exec", "mqtt-server", "mosquitto_sub", "-h", "localhost", "-t", "test", "-p", "1883", "-C", "1", "-W", "120"], | ||
stdout=subprocess.PIPE) | ||
rows = subprocess.check_output(["wc", "-l"], stdin=output.stdout) | ||
output.stdout.close() | ||
output.wait() | ||
rows = int(rows.decode('utf8').strip()) | ||
print(f"{rows} rows in 'test'") | ||
if rows < 1: | ||
print(f"Data check failed for case 'test'") | ||
sys.exit(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 |
---|---|---|
|
@@ -51,6 +51,7 @@ pub mod sink; | |
pub mod source; | ||
|
||
pub mod common; | ||
pub mod mqtt_common; | ||
|
||
pub use paste::paste; | ||
|
||
|
Oops, something went wrong.