Error Installing subquery returning a tuple

Hello

I am just getting started using Tigergraph for my projects - I have created a subquery that is syntactically working good but when I try to install , it is giving the following error

I dont know where/how to set up the single_gpr also…

I would appreciate any help on this

System Error in query getToplevelIdenticalPlan: line 1, col 114
Don’t support anonymous tuple in UDF mode!
Please create the query in DISTRIBUTED mode or enable the session parameter,
set single_gpr = true, to use this feature.

Warning: These queries below in the graph ‘MedicalPlans’ cannot be correctly installed:
[getToplevelIdenticalPlan]
For more information, please check log at node ‘m1’: /app1/tigergraph/log/gsql/ERROR.20220223-154051.781

Hi ramaiah78,

Sorry that you are seeing this error - let me briefly explain what this error means and why you are seeing it.

UDF and GPR are internal mechanisms for compiling GSQL queries. TigerGraph has recently been making changes to move towards compiling all queries using GPR across the board, which is why there are some small GSQL features that aren’t supported in UDF such as returning anonymous tuples. In the end, everything should compile in GPR and users won’t ever need to worry about this.

There are two things you could do:

  1. If you don’t have access to GSQL shell, you can use the DISTRIBUTED keyword to create a distributed query. All distributed queries compile using GPR.
  2. If you have access to GSQL shell, you can run set single_gpr = true in the GSQL shell to make all queries in that GSQL session to compile using GPR. You can also use the -SINGLE option when installing the query to make it compile in GPR mode.

I will also add a note in the documentation next to anonymous tuples that users need to enable GPR in order to use it.

For more details see:

  1. Queries :: Docs
  2. System & Language Basics :: Docs
1 Like

Thanks a lot for a quick response -

Set single_gpr in GSQL shell worked

btw when I tried using “Distributed” in the sub query , it installed but it gave error when installing the main query that is calling this sub query - fyi

thanks again,
Ramaiah