Java – dynamic table name in Cassandra POJO sink Flink
•
Java
I'm new to Apache Flink I am using POJO sink to load data into Cassandra Now, I specify the table and key space names with the help of the @ table annotation
Solution
@Table is a CQL annotation that defines the table to which such entities map At present, AFAIK cannot dynamically map it to any table at run time, because if no name is specified, it will infer the class name, i.e
@Table public class MyTable {...}
Inference table 'mytable'
@Table(table = "another_table") public class AnotherTable
Inference table 'other'_ table’
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码