小编Aru*_*lan的帖子

使用saveAsTable命令使用HiveContext保存sparkR数据帧

使用saveAsTable命令处理HiveContext时如何保存sparkR数据帧

df_5 <- loadDF(sqlContext, "Report02_cashier_Hourly_total_Trans_july30.parquet", "parquet")  /*I loaded the parquet file as dataframe*/
sqlContext <- sparkRHive.init(sc) /*Initialized the hive context*/

sql(sqlContext, "create table Report2_cashier_hourly (location_code INT, business_date DATE, cashier STRING, hour STRING, store_no STRING, region STRING, city STRING, zone STRING, Total_trans INT)") /*created a table Report2_cashier_hourly*/
Run Code Online (Sandbox Code Playgroud)

如何使用saveAsTable(df, tableName, source, mode, ...)将其保存df_5(data frame)到配置单元表中Report02_cashier_hourly.

dataframe apache-spark apache-spark-sql sparkr

5
推荐指数
0
解决办法
596
查看次数

3
推荐指数
1
解决办法
1445
查看次数