I have created keyspace and table in Cassandra from cqlsh
shell
CREATE KEYSPACE data WITH replication= {'class':'SimpleStrategy', 'replication_factor':1;
CREATE TABLE test.patient(id int, heart_rate int, PRIMARY KEY(id));
I want to create keyspace and Table if it does not exists from Flink code, Can someone please tell me how it can be done?
Flink-Cassandra connector does not have the feature to create keyspace/tables in Cassandra. You can check available methods in the connector here.
If you want to create keyspace/tables in C* if they are not already created by Flink you can do: