I need to sort by a field in a SAQL query, but I do not want that field to appear in my results.
For example, I am trying to do this
q = load "xxx";
q = foreach q generate 'account_id' as 'account_id', 'asset_type' as 'Asset Type', 'asset_name' as 'Asset Name', 'asset_link' as 'Asset Link';
q = order q by ('rank' asc, 'Asset Type' asc);
but I get the following error.
Unknown IDTOKEN: rank
However, if do this:
q = load "xxx";
q = foreach q generate 'account_id' as 'account_id', 'asset_type' as 'Asset Type', 'asset_name' as 'Asset Name', 'asset_link' as 'Asset Link', 'rank' as 'rank';
q = order q by ('rank' asc, 'Asset Type' asc);
It works just fine.
I don't want the rank
field to appear on my results, but I do not seem to have any luck with this.