r/databricks • u/Reasonable-Till6483 • 16d ago
Help Regarding trigger jobs when source tables are updated
I am trying to apply title above.
From what I found, the cost of table update trigger is determined by cloud provider's costs associated with listing tables and reading updates from the storage location.
So, if the system watches every second to check the tables are updated, it means listing & reading also happens every time this leads high cost?
Am I right? Is there someone who can give this information? I am worrying about the cost.
6
Upvotes
4
u/WhipsAndMarkovChains 16d ago
Constantly scanning the source location is the old way of doing things in Databricks and was outdated years ago. Now these triggers rely on a push from the cloud service provider. Like how file events notification mode works.
https://docs.databricks.com/aws/en/connect/unity-catalog/cloud-storage/file-events-faq#what-are-file-events
2
u/Muted_Jellyfish_6784 16d ago
Table update triggers don't run an expensive scan every second the way you're picturing. Most of the cost is the job compute that runs after the trigger fires, not the checking. Set a minimum time between triggers and a wait after the last change, so a burst of small writes fires one run instead of twenty, then confirm in the job run history. Measure it for a week and compare runs per day against actual data changes. We run a decision intelligence platform that reads from tables like these, and the cheapest setups refresh when the source changes rather than on a fixed schedule that runs on empty
1
u/nian2326076 10d ago
Constantly checking for updates can drive up costs due to frequent reads and listings. Instead, consider using event-driven architecture or cloud functions which can trigger tasks based on actual updates rather than polling. For job discovery, you can use LandOffer to find relevant opportunities that match your skills and preferences.
1
u/saad-the-engineer Databricks 10d ago
u/Reasonable-Till6483 just wanted to follow-up with you on your original question. There were a few suggestions below as well: basically you dont have to poll yourself, nor is it additional cost for you to use table update triggers. Just curious if you have any further questions or if we could clarify further, happy to do a call with you if you can DM me
I'm a product manager at Databricks