Issue
I want to write a .csv file in GCP storage directly from Julia.
Solution
GoogleCloud.jl supports this functionality and all steps can be found in it's tutorial
I cite it here but look at the tutorial's version.
using GoogleCloud
creds = JSONCredentials("credentials.json")
session = GoogleSession(creds, ["devstorage.full_control"])
set_session!(storage, session) # storage is the API root, exported from GoogleCloud.jl
file_contents = readstring(open("file.csv", "r"));
storage(:Object, :insert, "a12345foo"; # Returns metadata about the object
name="file.csv",
data=file_contents,
content_type="text/csv"
)
Answered By - Przemyslaw Szufel Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.