sohail's avatar
sohail
Data Storage
05-18-2025
Status:
New Idea

Add Support for OR condition between dimensions in Custom Row Level Security Plugin

Add Support for OR condition between dimensions in Custom Row Level Security Plugin
 
 
Example:
 
{
    "rules": [
        {
            "dim": "[employee.gender]",
            "members": [
                "Male",
                "Female"
            ]
        },
        {
            "dim": "[employee.country]",
            "members": [
                "Russia",
                "India"
            ]
        }
    ],
"includeAll": false,
"excludeAll": false
}
 
currently evaluates to
 
employee.gender in ("Male","Female")
AND
employee.country in ("Russia","India")
 
We request to add a new feature in the plugin that supports evalation of OR condition between 2 or more dimensions; or in more complex scenarios a mix of AND and OR conditions.
 
Example Psuedocode:
 
employee.gender in ("Male","Female")
OR
employee.country in ("Russia","India")
 
The JSON format can be something like below:
 
Example 1 (OR):
{
    "rules": [
        {
            "condition": "OR",
            "dimensions": [
{
"dim": "[employee.gender]",
"members": [
"Male",
"Female"
]
},
{
"dim": "[employee.country]",
"members": [
"Russia",
"India"
]
}
]
        }
    ],
"includeAll": false,
"excludeAll": false
}
 
Example 2 (mix of AND and OR):
{
    "rules": [
        {
            "condition": "AND",
            "dimensions": [
{
"dim": "[employee.age]",
"members": [
"20",
"30",
"40",
"50"
]
},
{
"condition": "OR",
"dimensions": [
{
"dim": "[employee.gender]",
"members": [
"Male",
"Female"
]
},
{
"dim": "[employee.country]",
"members": [
"Russia",
"India"
]
}
]
}
]
        }
    ],
"includeAll": false,
"excludeAll": false
}

1 Comment

  • AssafHanina's avatar
    AssafHanina
    Sisense Employee

    hey sohail ,

    thanks for submitting the feedback for the product team.

    Please consider an alternative implementation for Data Security using OR Condition as describe in the following article 

    Best Regards

    Assaf, Solution Consultant