Named Query - Get Value of Cell

Hello,

I’m calling a named query in a script transform using the system.db.runNamedQuery. I’m having troubles figuring out how to access a single cell value in the results of a named query. The result of my named query is a table that is 4 rows and 8 columns. I’m interested in pulling out just some of the values in this table to use in my script transform. There’s some confusion on my end of what type of object the system.db.runNamedQuery returns.

Is it a JSON, Dataset, or PyDataset?

How do I access an single value in the table within my script?

Thank You

I figured it out. It is a dataset. I was getting 0 rows from my named query because my parameter name I was passing didn’t match the parameter name in the named query. Note: it is case sensitive!

2 Likes