DotReferenceJythonMap object doesn't support item deletion.
Tried your sample script and I'm getting a "Parse Error in script transform" on row_dict = {}.
(by the way, how do you copy/paste an error message when it's only visible in the tooltip when you hover over the Error_Configuration script result in the binding dialog?)
This post talks about having to re-map a JythonMap into an array of dictionaries due to chained transforms. I only have one single transform here, but I tried re-mapping the JythonMap object and that seems to work:
value = [dict(x) for x in value[:]]
cols = ["id","loc"]
result=[]
for row in value:
for key in row.keys():
if key not in cols:
del row[key]
result.append(row)
return value
So before I move on, I'm curious if this is the best solution or if there's something else I should be doing to avoid the need to remap (ok, use a dataset result from the query, yeah I know, but is that all?).