How to convert javaRDD to dataset
I am trying to use spark to read the data from the Oracle database into a dataset, then convert the dataset into javaRDD for map operation. My code can only store the dataset Spark official documents show: http://spark.apache.org/docs/latest/sql-programming-guide.html#inferring-the-schema-using-reflection // Apply a schema to an RDD of JavaBeans to get a DataFrame Dataset<Row> peopleDF = spark.createDataFrame(peopleRDD, Person.class); Our Data is read from Oracle. How do I define the Person.class to store and convert the rdd to dataset? Or how can I use Java directly to take the map operation
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.