I suppose your output data is “ORC”, and want to save to hive database: test,
external table name is : testTable
import scala.collection.immutable
sqlContext.createExternalTable(“test.testTable",
"org.apache.spark.sql.hive.orc", Map("path" -> “/data/test/mydata"))
> On Dec 7, 2015, at 5:28 PM, Divya Gehlot <[email protected]> wrote:
>
> Hi,
> I am new bee to Spark.
> Could somebody guide me how can I persist my spark RDD results in Hive using
> SaveAsTable API.
> Would appreciate if you could provide the example for hive external table.
>
> Thanks in advance.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]