[Perspective] system.db.runPrepQuery() giving error "Unknown Source"

I’m trying to run a simple prep query in a perspective transform script. My code is as follows:

2 query = “SELECT * FROM productionmodel WHERE ItemPath = ?”
3 data = system.db.runPrepQuery(query, [value], “Dev”)

The error I’m getting is in this image (is there a better way to get the full text of this error? I can’t copy and paste it and the full text has to stretch across 3 of my monitors for me to see it all):

I was able to find a thread of someone having a similar error but their issue was that they didn’t specify the data source in a gateway scoped script. I’ve specified it here and still get this error. That thread is here.

Any help is appreciated.

I’m able to generate that same error if I target a table or column which does not exist.

The first two screenshots don’t make it clear that this is in a transform, but they are indeed in a transform.

Column doesn’t exist:

Table doesn’t exist:

Valid query:

There I go overlooking the obvious for something complicated. Thanks @cmallonee

1 Like