I have an access to Cassandra via Zeppelin user. There are some tables in "default" keyspace. How can I call them to DataFrame in PySpark? I have no problem calling them from spark.sql using keyspace.tableName. But when I call using PySpark, it cannot find the keyspace named default.
Here is the code I use:
df = spark.read.format("org.apache.spark.sql.cassandra").options(keyspace="default", table = "sometable").load()
Here is the error:
Py4JJavaError: An error occurred while calling o439.load. : java.io.IOException: Couldn't find table sometable or keyspace default - Found similar keyspaces and table dse_perf.key_cache at com.datastax.spark.connector.cql.Schema$.tableFromCassandra(Schema.scala:358)