Why does this query work in testing, but not when I try to populate a table?

I'm trying to learn how to use SQL in ignition. When I execute this query in a testing environment I get this data

image

When I try to bind it to a table, I get this error:



Why would it work in testing, but not on a binding?

On the error popup there is a link to the full error. Can you click that and then copy and paste it properly formatted here? There might be more information in that error that will help.

java.lang.Exception: Error running query:
com.inductiveautomation.factorypmi.application.gateway.NQuery@45674957@0ms
On: Popup.Root Container.Table.data
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:311)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error in named query practice
	at com.inductiveautomation.factorypmi.application.gateway.NQuery.execute(NQuery.java:78)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:668)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:308)
	... 1 more

Ignition v8.1.48 (b2025042910)
Java: Azul Systems, Inc. 17.0.14

Sure, here it is

Have you saved your project since your last edit to the NQ?

1 Like

yes, I just saved again in case I was mistaken. Still no dice

Is there a corresponding logged error in the gateway?

I'm not seeing one, just a bunch of errors from the email notification pipeline I created:

I scrolled to where the error would be, and did not see anything other than more of these

Try turning off the noisy logger then running the table query again.

(You are trying to send email through IA's servers, so of course that part doesn't work. :roll_eyes: )

Do you mean disabling the pipeline, or something else?

Either disable the pipeline (probably the right thing, since it cannot work with IA's server), or disable the logger. (Hit the gear icon on the logs page, search for that logger, and set it's level to OFF.)

I disabled the email pipeline by renaming it. I'm still not seeing an error on the gateway. I have tried several more times

You may need to enable DEBUG logging on named query execution. (I don't know the logger names off the top of my head--search in the logger level controls.)

this right?

Yep, and/or the one above it.

I'm still not getting any error information on the gateway. This is all I'm seeing:

In that error box, there are other errors. Do any of them pertain to this query? Is there anything in the Designer Console?

I have the query set to run every 20 seconds on the table so I will see it if it shows up on the gateway. Those are just more instances of the same error

Is this named query in the same project that you have the table in? You have saved the named query and saved the project as well, correct?

Yes, the named query is in the same project. I have saved the project as a whole many times. Is there something I need to do to save the query in particular?

Not that I'm aware of. Named queries though typically just work.

Do you have the named query open? If so close it, and then save the project.

Did you check the Developer Console, Help -> Diagnostics -> Console and see if there is anything more in that window? Maybe clear it and then open your offending window to see if something popups up.