0
votes

Failing to see the data in Scala using Vora.

VORA: 1.2 Spark: 1.5.2 / Spark controller: 1.5.8

The hdfs file "content" showing fine.

hdfs dfs -cat /user/vora/XXXXXXXX/part-00000 AB05,560 CD06,340 EF07,590 GH08,230

Table showing up fine in the "show datasourcestables" command

scala> vc.sql(s"""SHOW DATASOURCETABLES USING com.sap.spark.vora""".stripMargin ).show Output

Show table is failing in Scala scala> vc.sql("select * from VVCSV").show

scala> vc.sql("select * from VVCSV").show

java.lang.RuntimeException: Table Not Found: VVCSV at scala.sys.package$.error(package.scala:27) at >org.apache.spark.sql.catalyst.analysis.SimpleCatalog.lookupRelation(Catalog.scala:139) at >org.apache.spark.sql.extension.ExtendableSQLContext$$anon$2.org$apache$spark$sql$catalyst$analysis$OverrideCatalog$$super$lookupRelation(ExtendableSQLContext.scala:52) at >org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:203) at >?>org.apache.spark.sql.catalyst.analysis.OverrideCatalog$$anonfun$lookupRelation$3.apply(Catalog.scala:203) at scala.Option.getOrElse(Option.scala:120)

1

1 Answers

0
votes

Command show datasourcetables is deprecated with Vora1.2 and been replaced by show tables using com.sap.spark.vora. However that command is only showing what is persisted in the Vora catalog. To load the tables in the current Spark context (e.g. after restarting the spark-shell) you need to run the register tables command:

vc.sql("register all tables using com.sap.spark.vora").show

To check what is in the current Spark context you can use the show tables command (without the 'using' clause). For more details you can check the Vora Developer Guide and the Spark documentation.