How to schedule a job to execute Python script in cloud to load data into bigquery?

爷,独闯天下 提交于 2021-02-07 20:34:56

问题


I am trying to setup a schedule job/process in cloud to load csv data into Bigquery from google buckets using a python script. I have manage to get hold off the python code to do this but not sure where do I need to save this code so that this task could be completed as an automated process rather than running the gsutil commands manualy.


回答1:


Reliable Task Scheduling on Google Compute Engine  |  Solutions  |  Google Cloud Platform, the 1st link in Google on "google cloud schedule a cron job", gives a high-level overview. Scheduling Tasks With Cron for Python  |  App Engine standard environment for Python  |  Google Cloud Platform, the 2nd link, has step-by-step instructions. They boil down to:

  • Create cron.yaml in the specificed format alongside your app.yaml
  • optionally test it at a development server
  • upload it to the Google Cloud with appcfg.py update or update_cron


来源:https://stackoverflow.com/questions/40016694/how-to-schedule-a-job-to-execute-python-script-in-cloud-to-load-data-into-bigque

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!