I have a Nodejs script which will fetch data from bigquery and populate some of it in a database (running on Google Cloud Platform). If the script is fetchdata.js, then running it on server from the command line would be node fetch.js However, I am not sure how to accomplish this with the Google Cloud Platform. It seems that I have to deploy this script as a separate service (using Google App engine/ Compute engine) and then call that service externally (using the browser) to execute that piece of code. Am I missing something here? Earlier I thought this could be accomplished using Google Cloud Functions but even that does not seem to be the correct use case.
Yes, You would need a client to connect to you SQL (database) in order to insert the fetched data and for that you would need to use one of the services (Google Compute Engine or Google App Engine)
In App Engine you can run your NodeJS script and then connect the App Engine instance to Cloud SQL database ( if you are using Google Cloud SQL database )
In Compute Engine, you can run the script and connect the Compute Engine Virtual Machine to the database
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.