Last active
May 21, 2019 16:01
-
-
Save MichaelDrogalis/a307941b015cdf723cd52cbf18a0b1cc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
INSERT INTO all_publications (author, title) VALUES ('C.S. Lewis', 'The Silver Chair'); | |
INSERT INTO all_publications (author, title) VALUES ('George R. R. Martin', 'A Song of Ice and Fire'); | |
INSERT INTO all_publications (author, title) VALUES ('C.S. Lewis', 'Perelandra'); | |
INSERT INTO all_publications (author, title) VALUES ('J. R. R. Tolkien', 'The Hobbit'); | |
INSERT INTO all_publications (author, title) VALUES ('J. R. R. Tolkien', 'The Lord of the Rings'); | |
INSERT INTO all_publications (author, title) VALUES ('J. R. R. Tolkien', 'The Fellowship of the Ring'); |
This file contains hidden or 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
CREATE STREAM all_publications (author VARCHAR, title VARCHAR) WITH (kafka_topic = 'publication_events', partitions = 1, key = 'author', value_format = 'avro'); | |
CREATE STREAM george_martin WITH (kafka_topic = 'george_martin_books', partitions = 1) AS SELECT author, title FROM all_publications WHERE author = 'George R. R. Martin'; |
This file contains hidden or 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
{ | |
"tests": [ | |
{ | |
"name": "filter by author", | |
"statements": [ | |
{"kind": "file", "file": "inputs.sql"}, | |
{"kind": "file", "file": "statements.sql"}, | |
], | |
"outputs": [ | |
{ | |
"topic": "george_martin_books", | |
"key": "George R. R. Martin", | |
"value": { | |
"AUTHOR": "George R. R. Martin", | |
"TITLE": "A Song of Ice and Fire" | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment