A) compare differences between specific version (if you're not using that feature, create new version, and modify any of the existing transformation - event adding "--test comment" anywhere will do) and a draft. Then you can take whole JSON including full transformation data:
B) You can use PyCelonis Python package for that purpose. More complicated, but you can automate data retrival, and get specific information needed f.e.: only SQL transformation code.