Cassandra join with streaming data is not working when column name is stored in Cassandra as camelCase
Steps to reproduce :
1. create a Cassandra table with column name in camelCase
CREATE TABLE pl_event (
"tntId" varcha
"pId" varcha
type varcha
PRIMARY KEY ("tntId", "pId
) WITH comment='event mapping records';
2. Read streaming data from kafka
eg :entityDF
3. Read data from Cassandra table. eg :
Dataset<Row> cassandraDf = spark.read() .format("org.apache.spark.sql.cassandra") .option("table", "pl_event") .option("keyspace", "test") .option("directJoinSetting","on") .load();
4. Try to join streaming DF with Cassandra read DF
entityDF = entityDF.join(cassandraDF,cassandraDF.col("tntId").equalTo(entityDF.col("tntId")).and(cassandraDF.col("pId").equalTo(entityDF.col("pId"))));
Error :
This fail with error saying "tntid" column is not found
Even we try to escape "tntId", it that case it says unable to find column ""tntId"" from table
Any suggestion or solution to handle direct join with column name stored in camelCase?