1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| CREATE STREAM admission_src (student_id INTEGER, gre INTEGER, toefl INTEGER, cpga DOUBLE, admit_chance DOUBLE) \ WITH (KAFKA_TOPIC=’dbserver1.public.admission’, VALUE_FORMAT=’AVRO’);
CREATE STREAM admission_src_rekey WITH (PARTITIONS=1) AS \ SELECT * FROM admission_src PARTITION BY student_id;
SHOW STREAMS;
CREATE TABLE admission (student_id INTEGER, gre INTEGER, toefl INTEGER, cpga DOUBLE, admit_chance DOUBLE)\ WITH (KAFKA_TOPIC=’ADMISSION_SRC_REKEY’, VALUE_FORMAT=’AVRO’, KEY=’student_id’);
SHOW TABLES;
CREATE STREAM research_src (student_id INTEGER, rating INTEGER, research INTEGER)\ WITH (KAFKA_TOPIC=’dbserver1.public.research’, VALUE_FORMAT=’AVRO’);
CREATE STREAM research_src_rekey WITH (PARTITIONS=1) AS \ SELECT * FROM research_src PARTITION BY student_id;
CREATE TABLE research (student_id INTEGER, rating INTEGER, research INTEGER)\ WITH (KAFKA_TOPIC=’RESEARCH_SRC_REKEY’, VALUE_FORMAT=’AVRO’, KEY=’student_id’);
|