Event trigger to run python script from Google Cloud -


i have python script reads csv file,create table in bigquery based on data in csv , loads data table on runtime. want trigger script whenever event occurs file arriving on specified bucket. python script present on vm instance(till now,used run script vm instance). there way execute script based on event trigger ?

a feature of google cloud storage called 'object change notifications' come in handy here. push notification web hook, can use processing code handle event (an example run on appengine given here, implement flask endpoint example).

another option use pub/sub notifications in combination cloud storage, in case more comfortable that. can use pub/sub python sdk listen specific topic events arrive in, , use code wrote handle these events.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -