Transforms on several materialised datasets

i’ve currently got a calculation job object that materialises and kicks off a transform. The transform depends on other materialized datasets which may or may not be built-in time when the transform is called… how can i get around this ‘race condition’ problem?

Which kind of materialization do you mean? An object-edits materialized dataset and a normal transform output behave differently here.

Either way, I wouldn’t kick the transform off directly. Put it on a schedule instead:

  • Use an event trigger on each upstream dataset, joined with AND, so it only runs once all of them have updated.
  • Or include the upstream datasets in the same schedule, so Foundry builds them in order first.

If it has to start from the action, use the “trigger schedule build” rule. The action doesn’t wait for the build, so the ordering has to come from the schedule. You can also write the schedule run RID to a property on your calculation job object to see whether it finished.