View source: R/write_csv_to_hive.R
write_csv_to_hive | R Documentation |
Write a CSV file to Hive
write_csv_to_hive(csv_file, id, server, schema_table, append_data = FALSE)
csv_file |
path to CSV file to upload, if only the name of file is provided, then it is assumed the file is in the current working directory reported by getwd(); see dplyr::read_csv documentation for further information. |
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 a CSV file 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)
library(magrittr)
df <- mtcars
zid <- 'XXXXX'
server <- 'edge.hadoop.co.com'
schema_table <- 'schema.table'
file <- c('table_for_hive.csv')
write_csv_to_hive(csv_file = file, 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.