How To upload datastore data to csv file in google cloud storage? -
How To upload datastore data to csv file in google cloud storage? -
https://developers.google.com/bigquery/articles/datastoretobigquery#ingestionjob
how upload datastore info csv file in google cloud storage?
i don't think there out-of-the-box way that. if incrementally, utilize code similar 1 below:
/** gcs service */ private static gcsservice gcsservice = gcsservicefactory.creategcsservice(new retryparams.builder() .initialretrydelaymillis(10).retrymaxattempts(10).totalretryperiodmillis(15000).build()); /** * create file on specified bucket */ public static void writefile(string bucketname, string filename, string filecontent) throws ioexception { gcsfilename gcsfile = new gcsfilename(bucketname, filename); gcsoutputchannel outputchannel = gcsservice.createorreplace(gcsfile, new gcsfileoptions.builder().mimetype("text/csv").build()); dataoutputstream out = new dataoutputstream(channels.newoutputstream(outputchannel)); out.write(filecontent.getbytes(charset.forname("utf-8"))); out.flush(); out.close(); } google-bigquery
Comments
Post a Comment