write_csv_to_hive: Write a CSV file to Hive

View source: R/write_csv_to_hive.R

write_csv_to_hiveR Documentation

Write a CSV file to Hive

Description

Write a CSV file to Hive

Usage

write_csv_to_hive(csv_file, id, server, schema_table, append_data = FALSE)

Arguments

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.

Details

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“

Value

Does not return anything.

Examples

## 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)


Fredo-XVII/RToolShed documentation built on March 17, 2024, 12:15 p.m.