Is there any way to introduce debugging statements in your Transforms code, so you can later see them in driver logs, for example? Or is raising exceptions the only way to do this?
Yes this is possible as of transforms-python 1.9.0 driver logs get written to the transaction. You can use python logging to write logs. For example:
import logging
log = logging.getLogger(__name__)
def my_transform(input):
log.info("Testing logging")
return input