首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Spark将Dataframe数据写入Hive分区表的方案

    向hive数据仓库写入数据必须指定数据库,hive数据表建立可以在hive上建立,或者使用hiveContext.sql("create table .....")...val hiveContext = new org.apache.spark.sql.hive.HiveContext(sc) import hiveContext.implicits._ hiveContext.sql...2、将DataFrame数据写入hive指定数据表的分区中 hive数据表建立可以在hive上建立,或者使用hiveContext.sql("create table....")...,使用saveAsTable时数据存储格式有限,默认格式为parquet,将数据写入分区的思路是:首先将DataFrame数据写入临时表,之后由hiveContext.sql语句将数据写入hive分区表中...val hiveContext = new org.apache.spark.sql.hive.HiveContext(sc) import hiveContext.implicits._ hiveContext.sql

    16.4K30
    领券