dosubot[bot] commented on issue #37551: URL: https://github.com/apache/superset/issues/37551#issuecomment-3818283113
<!-- Answer --> In Superset 6, when you omit the dataset id in your RLS array, the clause is applied globally to all datasets accessible by the embedded user. This means if any dataset in scope does not have the referenced column (even if most do), you'll get an "unknown column" error for that dataset's queries [example](https://github.com/apache/superset/issues/32869). If you are certain all datasets have the column, double-check that the dataset metadata in Superset is up to date for each one—sometimes a refresh is needed after schema changes. Also, make sure there are no virtual datasets or legacy charts in your dashboard that might reference a different schema. If only some datasets should have the RLS clause, or if you want to avoid this error, explicitly specify the dataset id in each RLS rule so the clause only applies where the column exists [details](https://github.com/apache/superset/issues/34203). Let me know if you want an example of how to structure the RLS array for dataset-specific rules. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ef1d3b14-2dd1-485f-84e1-298c7a68535f?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=In%20Superset%206%2C%20when%20you%20omit%20the%20dataset%20id%20in%20your%20RLS%20array%2C%20the%20clause%20is%20applied%20globally%20to%20all%20datasets%20accessible%20by%20the%20embedded%20user.%20This%20means%20if%20any%20dataset%20in%20scope%20does%20not%20have%20the%20referenced%20column%20%28even%20if%20most%20do%29%2C%20you%27ll%20get%20an%20%22unknown%20column%22%20error%20for%20that%20dataset%27s%20queries%C2%A0%5Bexample%5D%28https%3A//github.com/apache/superset/issues/32869%29.%0A%0AIf%20you%20are%20certain%20all%20datasets%20have%20the%20column%2C%20double-check%20that%20the%20dataset%20metadata%20in%20Superset%20is%20up%20to%20date%20for%20each%20one%E2%80%94sometimes%20a%20refresh%20is%20needed%20after%20schema%20changes.%20Also%2C%20 make%20sure%20there%20are%20no%20virtual%20datasets%20or%20legacy%20charts%20in%20your%20dashboard%20that%20might%20reference%20a%20different%20schema.%0A%0AIf%20only%20some%20datasets%20should%20have%20the%20RLS%20clause%2C%20or%20if%20you%20want%20to%20avoid%20this%20error%2C%20explicitly%20specify%20the%20dataset%20id%20in%20each%20RLS%20rule%20so%20the%20clause%20only%20applies%20where%20the%20column%20exists%C2%A0%5Bdetails%5D%28https%3A//github.com/apache/superset/issues/34203%29.%0A%0ALet%20me%20know%20if%20you%20want%20an%20example%20of%20how%20to%20structure%20the%20RLS%20array%20for%20dataset-specific%20rules.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37551) -- 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]
