Just wanted to check whether there’s any good way to apply a function/action to a large (~500k) amount of objects?
We have quite a few cases where we want to add a new property to an ontology object, and be able to backfill that property on all marketplace installations of that property easily.
We’ve avoided this for the most part but can we do something like object table select all → apply action or retroactively apply an automate?
An action can be applied to multiple objects by toggling “Allow multiple values” in the object reference parameter. Then in Workshop, an Object Table can use “enable multi-select”, which creates checkboxes for each row and a “Select all” checkbox in the table headers row. These selected objects can then be collectively passed to the action.
I don’t know if there is a limit to the number of objects that can be modified by an action.
It’s also possible to create an Action backed by a function that takes an Object Set as an input, then with the function you can collect all the objects from the set with .all() and iterate through that array with .forEach() like any other object.
I’ve found that useful in the past for doing group updates. Especially as you can trigger this action from a Hubble search, using the results of the current search as the object set input, and so it’s very flexible in terms of defining the input.
There are some limitations for automations documented but they vary a lot depending on the scenario:
https://www.palantir.com/docs/foundry/automate/limits#automation-scale-limits
So… the only way I see at the moment to apply this for a larger base of objects would be bucketing. You could actually script this via the Foundry API and the Apply Batch Actions API.
Something like: You set up an action type based on a typescript function that can apply the edits to a list of objects and then implement these API calls:
query object set with relevant objects (set pageSize to 5k objects) → use response to apply action, set es input parameter to a function-backed action. → repeat with next page from object set response.