Running the same SQL against different hosts/databases: can Resource be parameterized in a query?

That particular field requires the id, rather than the name of the resource. However, if you want to use the resource names within your app and use some logic to convert to the ids for this field, you might consider adding your adding your on-prem Retool instances backing database as a resource within your organization, as described in this Retool community post. You could then query the resources table within your apps as needed.