Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to save an R table from the CDSW onto my laptop

Highlighted

How to save an R table from the CDSW onto my laptop

New Contributor

I have a R script that first establishes a connection to HUE, grab a table from one of the databases, and then convert the table to an R object. 

 

Now I want to save that R object as a CSV on my computer with this line:

 

readr::write_csv(tbl_name, "C:/Users/UserName/Desktop/tbl_name.R")

 

But here is the error message:

 

Error in open.connection(path, "wb") : cannot open the connection
In addition: Warning message:
In open.connection(path, "wb") :
  cannot open file 'C:/Users/UserName/Desktop/tbl_name.R': No such file or directory