You can translate the question and the replies:

Questions about Define Rule/Plan in Resource Manager

Hi Team, We want to define a rule that when users run query for some views, it needs to add filters on 2 specific columns, otherwise their query will be stopped. Can you have soe custom message when query stopped like: need to filter data with columns XXXX and XXXX. By the way, we see there is an option in the "Plans", called Add variable vaues to the query context, what it is used for? can we use it in our requirement?
06-07-2023 10:32:22 -0400

1 Answer

Hi, * If you add two *View parameters* to a Selection View created over your view and you use them as *Where Conditions*, the user will be forced to provide these two parameters. See [Parameters of Derived Views]( * There's no direct option to check and set custom error messages at view level. What you can do is to create a custom Stored Procedure, see [here]( * The option *Add variables values to query context* is normally used to set [CONTEXT Clause]( parameters in order to add further restrinction to the user session but you can also define some custom variables that may be read later with [GETVAR('<variable_name>')]( You can try setting a Context variable with your restriction plan and read it inside your Stored procedure to execute some checks and return the custom messages. Hope this helps
Denodo Team
07-07-2023 08:24:02 -0400
You must sign in to add an answer. If you do not have an account, you can register here