You can use Aster Spark API classes and their methods to develop functions to use with the RunOnSpark function.