Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

Trigger a Function from a Table Commit

By default, functions trigger when any of their input tables receives new data. The trigger_by parameter lets users specify a subset of input tables that should trigger the function instead, or disable automatic triggering entirely.

make a transformer that reads the orders and regions tables and totals orders by region, but set it to only trigger on commits to the orders table

Needs a transformer. Getting its guide.

Called tabsdata 2 times (ctrl+o to expand)

Generating — trigger_by narrows the default trigger set to orders alone. regions is still read on every run and still supplies its current data, it just no longer starts one.

Called tabsdata 3 times (ctrl+o to expand)

The transformer, registered in sales:

@transformer(
input_tables=["orders", "regions"],
output_tables=["orders_by_region"],
trigger_by=["orders"],
)
def summarize(orders: TableFrameSpec, regions: TableFrameSpec) -> TableFrameSpec:
return orders.group_by("region").agg(col("amount").sum())

This is not about avoiding duplicate runs. A plan that commits both tables runs the transformer once either way, since the plan covers every downstream function and orders them by dependency rather than firing one run per committed table.