sql - SnappyData - Error creating Kafka streaming table -


i'm seeing issue when creating spark streaming table using kafka snappy shell.

'the exception 'invalid input 'c', expected dmloperation, insert, withidentifier, select or put (line 1, column 1):'

reference: http://snappydatainc.github.io/snappydata/streamingwithsql/#spark-streaming-overview

here sql:

create stream table if not exists sensor_data_stream  (sensor_id string, metric string) using kafka_stream  options (     storagelevel 'memory_and_disk_ser_2',     rowconverter 'io.snappydata.app.streaming.kafkastreamtorowsconverter',     zkquorum 'localhost:2181',     groupid 'streamconsumer',     topics 'test:01'); 

the shell seems not script @ first character 'c'. i'm attempting execute script using following command:

snappy> run '/scripts/my_test_sensor_script.sql'; 

any appreciated!

there inconsistency in documentation , actual syntax.the correct syntax is:

create stream table sensor_data_stream if not exists (sensor_id string,  metric string) using kafka_stream  options (storagelevel 'memory_and_disk_ser_2',  rowconverter 'io.snappydata.app.streaming.kafkastreamtorowsconverter',  zkquorum 'localhost:2181',  groupid 'streamconsumer',  topics 'test:01'); 

one more thing need write row converter data


Comments