[英]Save RData to Azure Blob Storage
I'm recently learning how to read & write files to Azure Blob Storage using R on Azure Databricks.我最近正在学习如何在 Azure Databricks 上使用 R 读取和写入文件到 Azure Blob 存储。 Are there any tutorials on how to save RData file to Azure Blob Storage?
是否有关于如何将 RData 文件保存到 Azure Blob 存储的教程?
The latest version of AzureStor now has a storge_save_rdata
function:最新版本的 AzureStor 现在有一个
storge_save_rdata
function:
bl <- blob_endpoint("https://myacct.blob.core.windows.net", key="mykey")
cont <- storage_container(bl, "mycontainer")
storage_save_rdata(iris, mtcars, container=cont, file="myblob.rdata")
There is a solution to upload the data frame as a CSV directly from the R environment using AzureStor package.有一种解决方案可以使用 AzureStor package 直接从 R 环境将数据帧作为 CSV 上传。
w_con <- textConnection("foo", "w")
write.csv(ds,w_con)
r_con <- textConnection(textConnectionValue(w_con))
close(w_con)
upload_blob(container, src=r_con, dest=paste0("check_",ds[1, "Claim Number"], '_',ds[1, "Claim Type"], ".csv"))
close(r_con)
For more details, see the operations on a blob container or blob.有关更多详细信息,请参阅对 blob 容器或 blob 的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.