I am trying to get records from a hive table but when trying to make the selection it says that the table does not exist. The error say Table or view not found: clientes lines 1 pos 14
import java.io.File; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.apache.spark.api.java.function.MapFunction; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Encoders; import org.apache.spark.sql.Row; import org.apache.spark.sql.SparkSession; public class Main { public static void main(String[] args) { String warehouseLocation = new File("spark-warehouse").getAbsolutePath(); SparkSession spark = SparkSession .builder() .appName("Java Spark Hive Example") .config("spark.sql.warehouse.dir", warehouseLocation) .enableHiveSupport() .getOrCreate(); Dataset<Row> df = spark.sql("select * from clientes"); df.show(); }
clientesthe name of the table? Could it be a typo? Just making sure.