I want to check if a column exists in cassandra table in java,and then perform an action if it exists.How do I do that?
You can get table definition via Metadata class. Something like:
Column column = cluster.getMetadata().getKeyspace("ks-name")
.getTable("table-name").getColumn("column-name");
if (column != null) {
// do your stuff
}