apache spark - Save sparkR dataframe with HiveContext using saveAsTable command -
how save sparkr data frame when working hivecontext using saveastable command
df_5 <- loaddf(sqlcontext, "report02_cashier_hourly_total_trans_july30.parquet", "parquet") /*i loaded parquet file dataframe*/ sqlcontext <- sparkrhive.init(sc) /*initialized 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 table report2_cashier_hourly*/
how use saveastable(df, tablename, source, mode, ...)
save df_5(data frame)
hive table report02_cashier_hourly
.
Comments
Post a Comment