Skip to content

Instantly share code, notes, and snippets.

@kaiwaehner
Created January 9, 2019 09:01
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kaiwaehner/a5d6710c2d038bada2d3dfd7a66d6450 to your computer and use it in GitHub Desktop.
Create KSQL STREAM for Preprocessing with Python
client.create_stream_as(table_name='creditcardfraud_preprocessed_avro',
select_columns=['Time', 'V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9', 'V10', 'V11', 'V12', 'V13', 'V14', 'V15', 'V16', 'V17', 'V18', 'V19', 'V20', 'V21', 'V22', 'V23', 'V24', 'V25', 'V26', 'V27', 'V28', 'Amount', 'Class'],
src_table='creditcardfraud_source',
conditions='Class IS NOT NULL',
kafka_topic='creditcardfraud_preprocessed_avro',
value_format='AVRO')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment