dosubot[bot] commented on issue #33346:
URL: https://github.com/apache/superset/issues/33346#issuecomment-2847779823

   <!-- Answer -->
   The issue you're experiencing is related to how Apache Superset handles 
Row-Level Security (RLS) when creating charts directly from SQL Lab. When you 
create a chart directly from SQL Lab without saving the query as a dataset, the 
RLS filters are not applied. This is because the chart creation process from 
SQL Lab does not automatically incorporate RLS constraints unless the query is 
saved as a dataset or virtual dataset first.
   
   In Superset, RLS is typically applied when queries are executed within SQL 
Lab, and the results are correctly filtered. However, when transitioning 
directly to chart creation from SQL Lab, the RLS predicates are not 
automatically included in the chart's data source unless the query is saved as 
a dataset. This behavior is due to the way Superset handles data sources for 
charts, which requires the dataset to be explicitly defined with RLS 
constraints.
   
   To ensure that RLS is applied when creating charts, you should save the SQL 
Lab query as a dataset first. This will preserve the RLS constraints and ensure 
that the chart reflects the filtered data as expected.
   
   
   <!-- 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/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/5a0545ad-bf9e-426f-a08a-6edb4a73cbaa?feedback_type=other)</sup>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to