View source: R/write_df_to_hive.R
write_df_to_hive | R Documentation |
Write an R dataframe to Hive
write_df_to_hive(df, id, server, schema_table, append_data = FALSE)
df |
dataframe Dataframe to upload; df is converted to csv for upload. |
id |
string ID of user. Password will be requested from the user at function call. |
server |
string server extention or path |
schema_table |
string "schema.table" Name of the table to write to in Hive. |
append_data |
logical, defaults to FALSE for overwrite; TRUE appends the to the data. |
Uploads an R dataframe and uploads it to Hive. This assumes that when you log into Hive/Hadoop, the login is similar to 'XXXXX@edge.hadoop.co.com“
Does not return anything.
## Not run:
library(ssh)
library(dplyr)
library(readr)
library(askpass)
df <- mtcars
zid <- 'XXXXX'
server <- 'edge.hadoop.co.com'
schema_table <- 'schema.table'
write_df_to_hive(df = df, id = zid, server = server, schema_table = schema_table)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.