RQL Filter Query Syntax Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

RQL Filter Query Syntax Error

L0 Member

I am testing few sample query with JOIN however running into multiple syntax errors.

I am trying match Azure  NSG  list  and  would like to know, if  Azure VNET contain subnet with that specific NSG. 

 NSG -ID to match with VNET-Subnet array contains NSGID.  

1,. Does Join  works for single elements between X and Y or if  there is single to multiple match between X and Y , along wiht Y with array match.

2. Does filter command needs left and right with variabl such as X.id ==Y.id or can it works X.id=="String"  

3. Can we use filter with X.id == [array1][?any([properties].id 0] or similar?

 

Below query shows syntax error

config from cloud.resource where api.name = 'azure-network-nsg-list' AND json.rule = flowLogsSettings.enabled is false and id equals "AAAA" as X;

config from cloud.resource where api.name = 'azure-network-vnet-list' as Y;

filter '($.Y.id equals "BBBB")';

 

 

 

 

1 REPLY 1

L2 Linker

Hello @HSoni_Northwell please find the answers below:

1. The filter command is like a join. You need one element in X to match with at least one element in Y.

2. The filter command needs left and right variables to work correctly. Remember, it's a join.

3. The correct syntax should be in these lines - filter '$.X.<path_to_value> <operator> $.Y.<path_to_value>'
More on joins & RQLs can be found here - https://docs.prismacloud.io/en/classic/rql-reference/rql-reference/rql-faqs

Cloud Security Architect @Prisma Cloud Customer Success
  • 1076 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!