View source: R/write_df_to_hive3.R
write_df_to_hive3 | R Documentation |
Write a Dataframe to Hive 3
write_df_to_hive3(df, id, schema, table, server, append_data = FALSE)
df |
must be a dataframe/tibble |
id |
string ID of user. Password will be requested at function call. |
schema |
string schema name in hive |
table |
string name for the table in hive. One will be created if not exists. |
server |
string server extention or path |
append_data |
logical, defaults to FALSE for overwrite; TRUE appends the to the data. |
Uploads an R dataframe to the edge node as a CSV, uploads it to
Hive, and creates a managed table. The function also cleans up the csv file
on the edge node and in the users' hdfs home location. 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)
library(magrittr)
df <- as.data.frame(Seatbelts)
id <- 'XXXXX'
server <- 'edge.hadoop.co.com'
schema <- 'schema'
table <- 'table'
write_df_to_hive3(df =
id = id,
schema = schema,
table = table,
server = server,
append_data = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.