GitHub user dosubot[bot] added a comment to the discussion: Seeking Some Help 
On DataSource Security / RLS

<!-- Answer -->
To ensure that Row-Level Security (RLS) is applied in SQL Lab when 
"RLS_IN_SQLLAB" is enabled, you need to verify that the RLS predicates are 
correctly inserted into your SQL queries. This is managed by the 
`execute_sql_statement` function, which checks if the "RLS_IN_SQLLAB" feature 
is enabled and then inserts RLS predicates using either 
`insert_rls_as_subquery` or `insert_rls_in_predicate`, depending on the 
database's capabilities 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/sql_lab.py)</sup>.

For querying virtual datasets without encountering the "relation not found" 
error, ensure that the query is executed with the correct schema and that any 
temporary tables or views are properly created before querying them. The 
`execute_sql_statements` function handles the execution of SQL statements and 
ensures that any necessary tables or views are created if the `select_as_cta` 
option is used 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/sql_lab.py)</sup>.

Make sure your SQL queries are structured correctly and that any necessary 
permissions or configurations are in place to access the virtual datasets.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/c63db893-c257-46c6-a2c3-0527c9d94156?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33308#discussioncomment-12999108

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to