Sorry about the confusion I created . I just have started learning this week.
Silly me, I was actually writing the schema to a txt file and expecting
records. This is what I was supposed to do. Also if you could let me know
about adding the data from jsonFile/jsonRDD methods of hiveContext to hive
tables it will be appreciated.
JavaRDD<String> result=writetxt.map(new Function<Row, String>() {
public String call(Row row) {
String temp="";
temp+=(row.getInt(0))+" ";
temp+=row.getString(1)+" ";
temp+=(row.getInt(2));
return temp;
}
});
result.saveAsTextFile("pqtotxt");
--
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-tp19259p19343.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]