Reputation: 1
I'm new to GCP, I'm trying to build an ETL stream that will upload data from files to BigQuery. It seems to me that the best solution would be to use gsutil. The steps I see today are:
Steps 1 and 2 would be performed according to the schedule, but I would like step 3 to be event driven. So when files are copied to a specific folder, gsutil will send them to the specified bucket in Cloud Storage. Any ideas how can this be done?
Upvotes: 0
Views: 1673
Reputation: 2593
Assuming you're running on a Linux VM, you might want to check out inotifywait
, as mentioned in this question -- you can run this as a background process to try it out, e.g. bash /path/to/my/inotify/script.sh &
, and then set it up as a daemon once you've tested it out and got something working to your liking.
Upvotes: 1