3

I want to run a nodejs Job whenever an entry is created on the spanner database. The entry in spanner database will contain some future timestamp. The nodejs Job should run at that particular timestamp.

Can I apply some db trigger to initiate the action?

Note: The nodejs Job is deployed on GKE

Ankur Verma
  • 75
  • 1
  • 12

1 Answers1

3

No, Cloud Spanner does not support triggers.

Either the application that creates the row calls the nodeJS job, or you have a regularly-occurring job that scans the relevant table for new rows.

RedPandaCurios
  • 2,264
  • 12
  • 20
  • AWS supports cloud watch through which we can specify the time to run the Job. Anything similar in google cloud? – Ankur Verma Jun 18 '19 at 09:25
  • Cloud Scheduler (https://cloud.google.com/scheduler/) for simple Cron-style jobs, Cloud Composer (https://cloud.google.com/composer/) for heavyweight job control and orchestration. – RedPandaCurios Jun 18 '19 at 12:20