I want to create a table then write to bigquery using a cloud function, but I dont want to duplicate the data in the tables so I deleted the table first then create the table each time I call the function. So the error is when I deleted the table first the insertAll cannot find the table when it is
Tag: google-cloud-functions
What Runnable to Pass when adding a listener to ApiFuture and ApiFuture?
I am saving a document to Google Cloud Firestore using Google Cloud Functions in Java language. I want to add a listener to future here. I am unable to find a Runnable which can serve the purpose here. I know I can call future.get() method to hold the execution and get the WriteResult object but I don’t…
Google Cloud Function java.lang.NoClassDefFoundError while following example code
i try to test a gcloud function with a storage trigger. The gcloud function should call a gcloud service which is public, but require authentication. I can execute the function locally without any problem. But on gcloud I can found a NoClassDefFoundError in the function logs. Failed to execute functions.Hello…
How to get the custom HTTP request header in server end by Java
I have a simple Google cloud function to receive the InputStream via an HTTP request. I can get the content type and input stream correctly. However, there is also some other information, such as a SourceFileName sent in the HTTP request header from the client. I am wondering how can I get this custom header …
How to read a file from maven resources folder in GCP Cloud Function?
My project uses Maven with the default folder structure and when my Google Cloud Function is trying to read a JSON file from the resources directory (src/main/resources), it fails with: File Not Found Exception Below is my code which is standard to read from the classpath resources folder. Any hints what coul…
How to trigger Cloud Dataflow pipeline job from Cloud Function in Java?
I have a requirement to trigger the Cloud Dataflow pipeline from Cloud Functions. But the Cloud function must be written in Java. So the Trigger for Cloud Function is Google Cloud Storage’s Finalise/Create Event, i.e., when a file is uploaded in a GCS bucket, the Cloud Function must trigger the Cloud da…