Anonymous
Not applicable

It depends what you want to do. You can certainly use python to write loops over spark.sql() queries.