Skip to content

Commit 3c1ff85

Browse files
committed
Added KSQL examples for data augmentation
1 parent 65b32f3 commit 3c1ff85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

live-demo___python-jupyter-apache-kafka-ksql-tensorflow-keras.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ CREATE STREAM creditcardfraud_preprocessed_avro WITH (VALUE_FORMAT='AVRO', KAFKA
9999
// Mask User Name (Example: Hans => Xxns)
100100
SELECT Id, MASK_LEFT(User, 2) FROM creditcardfraud_source;
101101
102+
// IFNULL(col1, retval)
103+
SELECT Id, IFNULL(Class, -1) FROM creditcardfraud_source;
104+
102105
// make sure that you key your source topic for user data, otherwise you have show rekeying it KSQL which is cumbersome
103106
1:{user_id:1, class:platinum}
104107
2:{user_id:2, class:bronze}

0 commit comments

Comments
 (0)