I am unclear on what you are asking, or maybe you are unclear on how transforms are normally used.
What is your use case for wanting to do this? It sounds very complex. I take it that you want to get data from a non-zenoss database into zenoss transforms.
In enterprise, I think what you can do here is to pull in data from the SQL Transaction zenpack to run an sql query that then grabs data into a datapoint (perf data). You can then use these datapoints in transforms. Otherwise, you would be doing major hacking inside of zenoss to allow it to natively pull in data straight into the transform - this method would likely not be worth the effort.
I want to run a synthetic transaction against a table on DB2.
If the synthetic query fails to retrieve the record(s) for any reason such as: Couldn't establish connection; password expired etc.
I need to create a zenoss alert.
I can do this for MySQL, Sybase and SQL Server databases using built-in templates but not DB2.
The ZenSQLTx ZenPack currently does not support DB2 and no Python DB2 drivers ship with Zenoss.
There are a couple of things that I might suggest:
a) Install a DB2 command-line client on the Zenoss collector and create a COMMAND data source + wrapper script to perform the query.
b) Open a support portal case to formally request the feature (ie DB2 support for ZenSQLTx)