I’m able to upload a file in Google Storage but the problem is that it goes to the default bucket where my static files are: GS_BUCKET_NAME=’static-files’ I’d like to continue uploading the static files to the ‘static-files’ bucket, but I would like to also upload the user files to a different bucket: ‘user-upload-files’ How can I do this in Django
Tag: google-cloud-platform
Create Multiple Virtual envs for Multiple kubernetes contexts
As of now i do to get pod in specific cluster is there a python way to set kubernetes context for a virtual env , so we can use multiple context at the same time example : This should be equivalent of Answer This isn’t probably a rational solution, but anyway… At some time I used different kubectl versions for
ModuleNotFoundError in Dataflow job
I am trying to execute a apache beam pipeline as a dataflow job in Google Cloud Platform. My project structure is as follows: Here’s my setup.py Here’s my pipeline code: Functionality of pipeline is Query against BigQuery Table. Count the total records fetched from querying. Print using the custom Log module present in utils folder. I am running the job
Can we create Dataproc Workflow Template by passing a path of Jupyter notebooks in step_id?
I have been trying to create Dataproc Workflow Template to execute Jupyter notebooks present on my Dataproc cluster but when I instantiate that template the jobs fail whereas if I download my notebooks as .py files and then add them to a Workflow Template it works. I am just curious if there is any way to create a Workflow Template
Big Query how to change mode of columns?
I have a Dataflow pipeline that fetches data from Pub/Sub and prepares them for insertion into Big Query and them writes them into the Database. It works fine, it can generate the schema automatically and it is able to recognise what datatype to use and everything. However the data we are using with it can vary vastly in format. Ex:
How to solve `CERTIFICATE_VERIFY_FAILED` error when install gcloud?
I tried to install gcloud in MacOs but failed. I tried two python versions 3.7.4 and 3.9.1 but both have the same issue. how can I install the gcloud? Is there any other dependencies I need? Answer There could be many possible reasons for this error, proxy configuration would be the one but as you mentioned you have no proxy
How to switch an IP from an instance to another with gcloud
Is there a way to “detach” a reserved internal or external IP address from a VM to assign it to another instance with the gcloud command? I want to do this as I’m scripting with Python and want to automate this process. Answer Following commands might help you – [1]. To reserve external ip addresses. [2]. To unset the external
How to edit endpoint settings on Unified AI Platform using Python?
I have successfully created an endpoint on Unified Cloud AI Platform and have deployed two Models to it – Model A and Model B with 20% and 80% of the traffic respectively. Now, on the Cloud Console (the UI) I get an option to Edit Settings and change the traffic split to 30% and 70% respectively and the Models are
Need help retrieving Google cloudSQL metadata and logs using Python
I am new to Google cloud and would like to know if there is a way to retrieve cloudSQL (MySQL) instance metadata and error logs using Python. I installed the Google cloud SDK and ran the following commands to retrieve metadata and I got detailed metadata like IP, region, disk, etc. gcloud sql instances describe my-instance-id I need to check
How to get a GCP identity-token programmatically with python
What is the python programmatic alternative to the gcloud command line gcloud auth print-identity-token? I am trying to invoke Google Cloud Function by http trigger (only for auth users) and i need to pass the identity token in the Authentication header. I have method which works great when i run the code on GCP app engine. However, i struggle to