My GSQL query (TG 3.x) returns vertices sets. These vertices have a vertex-attached accumulator.
However, I don’t want the accumulator’s value to be returned, as it clutters the response from the graphs and makes it massive.
Is there a way to either clear an accumulator’s value, even if it’s for all vertices? Or to omit it from the response?
Hey @alonharell
If I’m not mistaken, you’re looking to return only selected attributes from the vertex and exclude the accumulator values from the response.
One way to handle this is in the PRINT statement — you can explicitly specify which attributes to include. (There might be other ways as well, but this is the approach I’m familiar with.)
Here’s a simple example you can follow to see if it meets your requirement:
CREATE OR REPLACE DISTRIBUTED QUERY test(/* Parameters here */) FOR GRAPH CreditCardFraud_GS
{
SumAccum @countt;
res=SELECT U FROM User:U -(BELONGS_TO:e1)-CreditCard:c-(MADE:e2)-Transaction:t
ACCUM
U.@countt+=1
;
print res[res.user_name];
}
hope this will help u : )