CSV file formatting doesn't work for GCP BlobWriter

Advertisements I have same data as list of dict and want to import these in a CSV file in a GCP bucket. I’m importing these object as streaming: blob = defaults.bucket.blob(filename) csv_writer = BlobWriter(blob, content_type="text/csv") for data in result.get(‘events’): _source = data.get(‘_source’, {}) csv_writer.write(json.dumps(_source, indent=2).encode(‘utf-8’)) where _source is dict. The actual result in the CSV… Read More CSV file formatting doesn't work for GCP BlobWriter

create array of object with new line ( newline Json standard format conversion for BigQuery)

Advertisements I’ve created a json object to store it in Cloud Storage but I need it to be converted as newline Json standard format so BigQuery can read it. This is my code: items = [] for item in item_list: item = {‘key’: item} items.append(item) The actual current output looks like this: [{‘item’: ‘stuff’}, {‘item’:… Read More create array of object with new line ( newline Json standard format conversion for BigQuery)

How do you get the upload URL of a backend server so you can upload data to it?

Advertisements I am trying to upload some data to firebase storage by using an upload URL instead of the traditional way by using: Storage.storage().reference().child("Name").putFile("file name") The reason that I need the URL instead of going the traditional route is because I need to use URLSession to upload data so my task can finish uploading in… Read More How do you get the upload URL of a backend server so you can upload data to it?