Thanks for replying .I was unable to figure out how after I use jsonFile/jsonRDD be able to load data into a hive table. Also I was able to save the SchemaRDD I got via hiveContext.sql(...).saveAsParquetFile(Path) ie. save schemardd as parquetfile but when I tried to fetch data from parquet file back like so(below) and save data back to a text file i Got some weird values like "org.apache.spark.sql.api.java.Row@e26c01c7" in the text files generated as output :--
JavaSchemaRDD parquetfilerdd=sqlContext.parquetFile("path/to/parquet/File"); parquetfilerdd.registerTempTable("pq"); JavaSchemaRDD writetxt=sqlCtx.sql("Select * from pq"); writetxt.saveAsTextFile("Path/To/Text/Files"); // This step created text files which was filled with values like"org.apache.spark.sql.api.java.Row@e26c01c7" I know there must be something which could do it right, just that I haven't been able to figure out all the while. Could you please help . -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-apply-schema-to-queried-data-from-Hive-before-saving-it-as-parquet-file-tp19259p19338.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org