View source: R/write_csv_to_hive3.R
write_csv_to_hive3 | R Documentation |
Write a CSV file to Hive 3
write_csv_to_hive3(
csv_name,
csv_folder = ".",
id,
schema,
table,
server,
append_data = FALSE
)
csv_name |
string name of the file with .csv extension |
csv_folder |
string path to folder where CSV file is stored. Defaults to current working directory represented by ".". Do not place a "/" at the end of the path. |
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 a CSV file to the edge node, 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)
csv_name <- 'file.csv'
csv_folder <- getwd()
id <- 'XXXXX'
server <- 'edge.hadoop.co.com'
schema <- 'schema'
table <- 'table'
write_csv_to_hive3(csv_name = csv_name,
csv_folder = csv_folder,
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.