Last active
March 15, 2019 23:23
-
-
Save confluentgist/fec77a553824119bfef29119c62826e8 to your computer and use it in GitHub Desktop.
Connect to KSQL and CREATE TABLE Using Python
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
from ksql import KSQLAPI | |
client = KSQLAPI('http://localhost:8088') | |
client.create_stream(table_name='creditcardfraud_source', | |
columns_type=['Id bigint', 'Timestamp varchar', 'User varchar', 'Time int', 'V1 double', 'V2 double', 'V3 double', 'V4 double', 'V5 double', 'V6 double', 'V7 double', 'V8 double', 'V9 double', 'V10 double', 'V11 double', 'V12 double', 'V13 double', 'V14 double', 'V15 double', 'V16 double', 'V17 double', 'V18 double', 'V19 double', 'V20 double', 'V21 double', 'V22 double', 'V23 double', 'V24 double', 'V25 double', 'V26 double', 'V27 double', 'V28 double', 'Amount double', 'Class string'], | |
topic='creditcardfraud_source', | |
value_format='DELIMITED') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment