You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "stockarea (via GitHub)" <gi...@apache.org> on 2026/01/29 14:53:27 UTC
[I] Getting error on embedded dashboard in version 6. [superset]
stockarea opened a new issue, #37551:
URL: https://github.com/apache/superset/issues/37551
### Bug description
I am getting this error in embedded dashboard.
Error: (1054, \"Unknown column 'contract_document_number' in 'where clause'\")".
it was working fine in version 5.
but its giving this issue iin version 6
.
Can someone help me what I am missing?
### Screenshots/recordings
_No response_
### Superset version
6.0.0
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818423645
@dosu i also tried by having only one chart with very simple table.
<img width="1010" height="714" alt="Image" src="https://github.com/user-attachments/assets/58dc27a1-1e44-4939-957c-3bef34c43218" />
You can see inn photo that contract_document_number is present in the data set. But i am getting error.
how
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-4898926464
This is the double-RLS-application-on-virtual-datasets regression tracked in #37359 (now closed) and fixed by PR #37395, merged 2026-03-12. Closing as fixed, and would recommend retesting on a post-fix build.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "Vitor-Avila (via GitHub)" <gi...@apache.org>.
Vitor-Avila commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3946630578
@betodealmeida would you have any ideas here? Perhaps it's related with https://github.com/apache/superset/pull/36061 since `v6.x` includes `sqlglot`?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3858301468
<!-- Answer -->
Here's the current status: your issue is a known regression in Superset 6, where guest RLS (Row Level Security) filters are applied twice to virtual datasets in embedded dashboards. This double application causes SQL alias mismatches and "unknown column" errors, even if the column exists in your dataset. This did not happen in Superset 5 and is tracked in [GitHub issue #37359](https://github.com/apache/superset/issues/37359).
A fix is proposed in [PR #37395](https://github.com/apache/superset/pull/37395), which is open and under review. The PR author (@YuriyKrasilnikov) is actively working on it, but there is no explicit assignment to a specific maintainer yet. There is no configuration workaround except using physical datasets instead of virtual ones, which may not be practical for your use case.
You can follow progress or add context directly on the PR. If you have further technical questions or need more details about the workaround or the fix, let me know.
<!-- 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/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fc4bc4ae-b992-4e41-881b-ce3885ff3e5a?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Here%27s%20the%20current%20status%3A%20your%20issue%20is%20a%20known%20regression%20in%20Superset%206%2C%20where%20guest%20RLS%20%28Row%20Level%20Security%29%20filters%20are%20applied%20twice%20to%20virtual%20datasets%20in%20embedded%20dashboards.%20This%20double%20application%20causes%20SQL%20alias%20mismatches%20and%20%22unknown%20column%22%20errors%2C%20even%20if%20the%20column%20exists%20in%20your%20dataset.%20This%20did%20not%20happen%20in%20Superset%205%20and%20is%20tracked%20in%20%5BGitHub%20issue%20%2337359%5D%28https%3A//github.com/apache/superset/issues/37359%29.%0A%0AA%20fix%20is%20proposed%20in%20%5BPR%20%2337395%5D%28https%3A//github.com/apache/superset/pull/37395%29%2C%20which%20is%20open%20and%20under%20review.%20The%20PR%20author%20
%28%40YuriyKrasilnikov%29%20is%20actively%20working%20on%20it%2C%20but%20there%20is%20no%20explicit%20assignment%20to%20a%20specific%20maintainer%20yet.%20There%20is%20no%20configuration%20workaround%20except%20using%20physical%20datasets%20instead%20of%20virtual%20ones%2C%20which%20may%20not%20be%20practical%20for%20your%20use%20case.%0A%0AYou%20can%20follow%20progress%20or%20add%20context%20directly%20on%20the%20PR.%20If%20you%20have%20further%20technical%20questions%20or%20need%20more%20details%20about%20the%20workaround%20or%20the%20fix%2C%20let%20me%20know.) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818236376
<!-- Answer -->
In Superset 6, embedded dashboards now enforce stricter checks on dataset metadata and Row Level Security (RLS) rules. If a column like contract_document_number is referenced in a filter, RLS clause, or dashboard slice, it must exist in the dataset metadata and the underlying table or view. Any mismatch will cause SQL errors like the one you're seeing. This is a change from v5, where these checks were less strict.
Here’s what to check:
- Make sure contract_document_number exists in the underlying database table or view.
- In Superset, open the dataset used by your dashboard and confirm contract_document_number is listed as a column. If not, use the “refresh columns” option in the dataset editor.
- If you use RLS filters or Guest Tokens for embedded dashboards, verify that any RLS clause referencing contract_document_number is valid and the column exists in the dataset.
- After making changes, re-save the dataset and affected charts to update metadata.
If the problem persists, enable debug logging and inspect the full SQL query Superset generates to see exactly where the column reference fails. This new behavior is due to the refactored embedded dashboard and Guest Token logic in v6, which requires all referenced columns to be present and correct in the dataset metadata and database schema. More details on this change are available in the [Superset v6 code and PRs](https://github.com/apache/superset/pull/37395).
<!-- 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/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/94fea3f9-eaf8-4447-988a-4b897f5ffe56?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%20embedded%20dashboards%20now%20enforce%20stricter%20checks%20on%20dataset%20metadata%20and%20Row%20Level%20Security%20%28RLS%29%20rules.%20If%20a%20column%20like%20contract_document_number%20is%20referenced%20in%20a%20filter%2C%20RLS%20clause%2C%20or%20dashboard%20slice%2C%20it%20must%20exist%20in%20the%20dataset%20metadata%20and%20the%20underlying%20table%20or%20view.%20Any%20mismatch%20will%20cause%20SQL%20errors%20like%20the%20one%20you%27re%20seeing.%20This%20is%20a%20change%20from%20v5%2C%20where%20these%20checks%20were%20less%20strict.%0A%0AHere%E2%80%99s%20what%20to%20check%3A%0A-%20Make%20sure%20contract_document_number%20exists%20in%20the%20underlying%20database%20table%20or%20view.%0A-%20In%20Superset%2C%20open%20the
%20dataset%20used%20by%20your%20dashboard%20and%20confirm%20contract_document_number%20is%20listed%20as%20a%20column.%20If%20not%2C%20use%20the%20%E2%80%9Crefresh%20columns%E2%80%9D%20option%20in%20the%20dataset%20editor.%0A-%20If%20you%20use%20RLS%20filters%20or%20Guest%20Tokens%20for%20embedded%20dashboards%2C%20verify%20that%20any%20RLS%20clause%20referencing%20contract_document_number%20is%20valid%20and%20the%20column%20exists%20in%20the%20dataset.%0A-%20After%20making%20changes%2C%20re-save%20the%20dataset%20and%20affected%20charts%20to%20update%20metadata.%0A%0AIf%20the%20problem%20persists%2C%20enable%20debug%20logging%20and%20inspect%20the%20full%20SQL%20query%20Superset%20generates%20to%20see%20exactly%20where%20the%20column%20reference%20fails.%20This%20new%20behavior%20is%20due%20to%20the%20refactored%20embedded%20dashboard%20and%20Guest%20Token%20logic%20in%20v6%2C%20which%20requires%20all%20referenced%20columns%20to%20be%20present%20and%20correct%20in%20the%20dataset%20
metadata%20and%20database%20schema.%20More%20details%20on%20this%20change%20are%20available%20in%20the%20%5BSuperset%20v6%20code%20and%20PRs%5D%28https%3A//github.com/apache/superset/pull/37395%29.) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818274708
But all my datasets have that key and it was working fine previously.
Also right now in RLS array, i am not passing dataset id, and only passing my clause, assuming that clause will be applicable on all the datasets (it was working fine on version 5). So anything that can be the issue?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818420537
<!-- Answer -->
Superset 6 introduced stricter validation for embedded dashboards, especially around Row Level Security (RLS) and calculated columns. Even if all your datasets have the contract_document_number column, there are a few v6-specific issues that can cause the exact symptoms you’re seeing:
- If you use a global RLS clause (no dataset_id), Superset v6 applies it to every dataset in the dashboard. If any dataset—even a virtual one or a legacy chart—doesn’t have the column in both the metadata and the underlying table/view, all charts will fail and you’ll see only a couple of 400 errors in the network tab. This is a change from v5, where this was less strict. Try specifying dataset_id in each RLS rule to avoid this global application and see if charts load [details](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/charts/data/api.py#L180-L464).
- Superset 6.0.0+ requires Node.js 20.x for frontend builds. Using Node 16 (as in your setup) can cause missing assets and subtle UI failures, including dashboards not rendering [reference](https://github.com/apache/superset/issues/37282).
- There’s a regression in Superset 6 where calculated columns sometimes don’t inject their SQL expressions into the generated query, so the database sees only the column name and returns an “unknown column” error—even if the column exists in the dataset metadata. This did not happen in v5 [reference](https://github.com/apache/superset/issues/34784).
- If you have the DYNAMIC_PLUGINS feature flag enabled, dashboards can hang indefinitely in v6. Disable this flag in your superset_config.py [reference](https://github.com/apache/superset/issues/37282).
To troubleshoot:
1. Make sure you’re using Node.js 20+ and have rebuilt frontend assets.
2. Disable DYNAMIC_PLUGINS if it’s enabled.
3. Refresh columns for every dataset used in the dashboard.
4. Explicitly set dataset_id in each RLS rule.
5. If you use calculated columns, try removing them or rewriting the logic directly in the chart as a test.
If you still see 400 errors, check the full error message in the /api/v1/chart/data response for clues about which dataset or query is failing. Testing with a minimal dashboard (one chart, no RLS) can help isolate the problem.
<!-- 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/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/976d989e-763d-4a44-8cbc-74e14c0178db?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%206%20introduced%20stricter%20validation%20for%20embedded%20dashboards%2C%20especially%20around%20Row%20Level%20Security%20%28RLS%29%20and%20calculated%20columns.%20Even%20if%20all%20your%20datasets%20have%20the%20contract_document_number%20column%2C%20there%20are%20a%20few%20v6-specific%20issues%20that%20can%20cause%20the%20exact%20symptoms%20you%E2%80%99re%20seeing%3A%0A%0A-%20If%20you%20use%20a%20global%20RLS%20clause%20%28no%20dataset_id%29%2C%20Superset%20v6%20applies%20it%20to%20every%20dataset%20in%20the%20dashboard.%20If%20any%20dataset%E2%80%94even%20a%20virtual%20one%20or%20a%20legacy%20chart%E2%80%94doesn%E2%80%99t%20have%20the%20column%20in%20both%20the%20metadata%20and%20the%20underlying%20table/view%2C%20all%20charts%20will%2
0fail%20and%20you%E2%80%99ll%20see%20only%20a%20couple%20of%20400%20errors%20in%20the%20network%20tab.%20This%20is%20a%20change%20from%20v5%2C%20where%20this%20was%20less%20strict.%20Try%20specifying%20dataset_id%20in%20each%20RLS%20rule%20to%20avoid%20this%20global%20application%20and%20see%20if%20charts%20load%C2%A0%5Bdetails%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/charts/data/api.py%23L180-L464%29.%0A%0A-%20Superset%206.0.0%2B%20requires%20Node.js%2020.x%20for%20frontend%20builds.%20Using%20Node%2016%20%28as%20in%20your%20setup%29%20can%20cause%20missing%20assets%20and%20subtle%20UI%20failures%2C%20including%20dashboards%20not%20rendering%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/37282%29.%0A%0A-%20There%E2%80%99s%20a%20regression%20in%20Superset%206%20where%20calculated%20columns%20sometimes%20don%E2%80%99t%20inject%20their%20SQL%20expressions%20into%20the%20generated%20query%2C%20so%20the%20databa
se%20sees%20only%20the%20column%20name%20and%20returns%20an%20%E2%80%9Cunknown%20column%E2%80%9D%20error%E2%80%94even%20if%20the%20column%20exists%20in%20the%20dataset%20metadata.%20This%20did%20not%20happen%20in%20v5%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/34784%29.%0A%0A-%20If%20you%20have%20the%20DYNAMIC_PLUGINS%20feature%20flag%20enabled%2C%20dashboards%20can%20hang%20indefinitely%20in%20v6.%20Disable%20this%20flag%20in%20your%20superset_config.py%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/37282%29.%0A%0ATo%20troubleshoot%3A%0A1.%20Make%20sure%20you%E2%80%99re%20using%20Node.js%2020%2B%20and%20have%20rebuilt%20frontend%20assets.%0A2.%20Disable%20DYNAMIC_PLUGINS%20if%20it%E2%80%99s%20enabled.%0A3.%20Refresh%20columns%20for%20every%20dataset%20used%20in%20the%20dashboard.%0A4.%20Explicitly%20set%20dataset_id%20in%20each%20RLS%20rule.%0A5.%20If%20you%20use%20calculated%20columns%2C%20try%20removing%20them%20or%20rewriting%20the%20l
ogic%20directly%20in%20the%20chart%20as%20a%20test.%0A%0AIf%20you%20still%20see%20400%20errors%2C%20check%20the%20full%20error%20message%20in%20the%20/api/v1/chart/data%20response%20for%20clues%20about%20which%20dataset%20or%20query%20is%20failing.%20Testing%20with%20a%20minimal%20dashboard%20%28one%20chart%2C%20no%20RLS%29%20can%20help%20isolate%20the%20problem.) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3946501131
Adding this to the release bugs board (CC @sadpandajoe ) and CC'ing @Vitor-Avila to make him aware in case this affects any Embedded users of Preset.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #37551: Getting query error on embedded dashboard in version 6 for RLS.
URL: https://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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting query error on embedded dashboard in version 6 for RLS. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3858284316
@dosu what are we doing here? Can it be assigned to some person or clarified?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3821910818
Hello team any update over the above stack trace?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818353080
I double checked and all of the datasets have contract_document_number column.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818324073
<!-- Answer -->
In Superset 6, if you use a global RLS clause (by omitting dataset ids), that clause is applied to every dataset in the dashboard. If even one dataset is missing the referenced column (like contract_document_number), every chart using that dataset will fail, and Superset will batch the chart data requests—so a single error can cause all charts to fail with just a couple of 400 responses from /api/v1/chart/data ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/charts/data/api.py#L187-L464), [source](https://github.com/apache/superset/issues/32889)).
To resolve this, double-check that every dataset used in your dashboard (including virtual datasets and legacy charts) has contract_document_number in both the dataset metadata and the underlying table/view. Use the "refresh columns" feature in the dataset editor if needed. If only some datasets should have the RLS clause, explicitly specify the dataset ids in your RLS array to avoid applying the clause where the column doesn't exist.
Also, make sure your environment matches Superset 6 requirements: Node.js 20+ for frontend builds, all database migrations applied, and clear your browser cache after upgrading ([source](https://github.com/apache/superset/issues/37282)).
If you still see 400 errors, check the exact error message and payload in the /api/v1/chart/data responses—this will tell you which dataset or chart is causing the failure. If needed, try isolating the dashboard to a single chart at a time to identify the problematic dataset or configuration.
<!-- 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/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1c7a743d-d288-403d-b2e3-ede01296dbe4?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%20if%20you%20use%20a%20global%20RLS%20clause%20%28by%20omitting%20dataset%20ids%29%2C%20that%20clause%20is%20applied%20to%20every%20dataset%20in%20the%20dashboard.%20If%20even%20one%20dataset%20is%20missing%20the%20referenced%20column%20%28like%20contract_document_number%29%2C%20every%20chart%20using%20that%20dataset%20will%20fail%2C%20and%20Superset%20will%20batch%20the%20chart%20data%20requests%E2%80%94so%20a%20single%20error%20can%20cause%20all%20charts%20to%20fail%20with%20just%20a%20couple%20of%20400%20responses%20from%20/api/v1/chart/data%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/charts/data/api.py%23L187-L464%29%2C%20%5Bsource%5D%28https%3A//github.
com/apache/superset/issues/32889%29%29.%0A%0ATo%20resolve%20this%2C%20double-check%20that%20every%20dataset%20used%20in%20your%20dashboard%20%28including%20virtual%20datasets%20and%20legacy%20charts%29%20has%20contract_document_number%20in%20both%20the%20dataset%20metadata%20and%20the%20underlying%20table/view.%20Use%20the%20%22refresh%20columns%22%20feature%20in%20the%20dataset%20editor%20if%20needed.%20If%20only%20some%20datasets%20should%20have%20the%20RLS%20clause%2C%20explicitly%20specify%20the%20dataset%20ids%20in%20your%20RLS%20array%20to%20avoid%20applying%20the%20clause%20where%20the%20column%20doesn%27t%20exist.%0A%0AAlso%2C%20make%20sure%20your%20environment%20matches%20Superset%206%20requirements%3A%20Node.js%2020%2B%20for%20frontend%20builds%2C%20all%20database%20migrations%20applied%2C%20and%20clear%20your%20browser%20cache%20after%20upgrading%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/37282%29%29.%0A%0AIf%20you%20still%20see%20400%20errors%2C%20ch
eck%20the%20exact%20error%20message%20and%20payload%20in%20the%20/api/v1/chart/data%20responses%E2%80%94this%20will%20tell%20you%20which%20dataset%20or%20chart%20is%20causing%20the%20failure.%20If%20needed%2C%20try%20isolating%20the%20dashboard%20to%20a%20single%20chart%20at%20a%20time%20to%20identify%20the%20problematic%20dataset%20or%20configuration.) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818297229
No chart is getting loaded in my dashboard right now because of this error, Not particular chart. And most of the charts have different datasets and in the network tab, I see it geerates only 2 requests and get 400.
https://dashboard.stockarea.io/api/v1/chart/data
so what can be the issue?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818374203
I am telling right its working perfectly on version 5 but getting this issue on version 6 and no chart is being loaded in version 6 in embedded dashboard.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818475120
<!-- Answer -->
Even if the column is visible in your dataset metadata, Superset 6 introduced stricter validation and a regression that can cause this exact error in embedded dashboards—especially if you use Row Level Security (RLS) rules with guest tokens.
If your dataset is a virtual dataset (i.e., defined by a custom SQL query, not mapped directly to a physical table), Superset 6 can apply the RLS clause twice: once to the underlying table and again to the outer query. This double application causes SQL alias mismatches, so even valid columns like contract_document_number can trigger "unknown column" errors in the generated SQL, despite being present in the dataset and the database. This is a regression from Superset 5 and is tracked here: [Superset 6 double RLS regression](https://github.com/apache/superset/issues/37359).
To confirm if this is the cause, try these steps:
1. Remove all RLS rules (including guest token RLS) and reload the simple chart. If the error disappears, RLS is the trigger.
2. If you must use RLS, and your dataset is virtual, try switching to a physical dataset (direct table mapping) as a temporary workaround.
3. If you can, share the full SQL query Superset generates (from the error details or logs)—this will help confirm if the double RLS application is happening.
There is currently no config workaround except using physical datasets. The fix will require a Superset code update to prevent double RLS application in this scenario. More details and tracking are here: [PR 37395](https://github.com/apache/superset/pull/37395).
Let me know if you need help checking if your dataset is virtual or physical, or if you want to try the RLS removal test.
<!-- 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/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8567c72f-8fbe-4d03-ae31-ee51c3fee1eb?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Even%20if%20the%20column%20is%20visible%20in%20your%20dataset%20metadata%2C%20Superset%206%20introduced%20stricter%20validation%20and%20a%20regression%20that%20can%20cause%20this%20exact%20error%20in%20embedded%20dashboards%E2%80%94especially%20if%20you%20use%20Row%20Level%20Security%20%28RLS%29%20rules%20with%20guest%20tokens.%0A%0AIf%20your%20dataset%20is%20a%20virtual%20dataset%20%28i.e.%2C%20defined%20by%20a%20custom%20SQL%20query%2C%20not%20mapped%20directly%20to%20a%20physical%20table%29%2C%20Superset%206%20can%20apply%20the%20RLS%20clause%20twice%3A%20once%20to%20the%20underlying%20table%20and%20again%20to%20the%20outer%20query.%20This%20double%20application%20causes%20SQL%20alias%20mismatches%2C%20so%20even%20valid%20columns%20like%20contra
ct_document_number%20can%20trigger%20%22unknown%20column%22%20errors%20in%20the%20generated%20SQL%2C%20despite%20being%20present%20in%20the%20dataset%20and%20the%20database.%20This%20is%20a%20regression%20from%20Superset%205%20and%20is%20tracked%20here%3A%20%5BSuperset%206%20double%20RLS%20regression%5D%28https%3A//github.com/apache/superset/issues/37359%29.%0A%0ATo%20confirm%20if%20this%20is%20the%20cause%2C%20try%20these%20steps%3A%0A1.%20Remove%20all%20RLS%20rules%20%28including%20guest%20token%20RLS%29%20and%20reload%20the%20simple%20chart.%20If%20the%20error%20disappears%2C%20RLS%20is%20the%20trigger.%0A2.%20If%20you%20must%20use%20RLS%2C%20and%20your%20dataset%20is%20virtual%2C%20try%20switching%20to%20a%20physical%20dataset%20%28direct%20table%20mapping%29%20as%20a%20temporary%20workaround.%0A3.%20If%20you%20can%2C%20share%20the%20full%20SQL%20query%20Superset%20generates%20%28from%20the%20error%20details%20or%20logs%29%E2%80%94this%20will%20help%20confirm%20if%20the%20double
%20RLS%20application%20is%20happening.%0A%0AThere%20is%20currently%20no%20config%20workaround%20except%20using%20physical%20datasets.%20The%20fix%20will%20require%20a%20Superset%20code%20update%20to%20prevent%20double%20RLS%20application%20in%20this%20scenario.%20More%20details%20and%20tracking%20are%20here%3A%20%5BPR%2037395%5D%28https%3A//github.com/apache/superset/pull/37395%29.%0A%0ALet%20me%20know%20if%20you%20need%20help%20checking%20if%20your%20dataset%20is%20virtual%20or%20physical%2C%20or%20if%20you%20want%20to%20try%20the%20RLS%20removal%20test.) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818506166
1. If I am removing RLS rules, its working fine.
2. I have to use RLS and I have to make lot of joins and all, so I need to have virtual dataset it looks like.
3. How can I get the full SQL query Superset is generating?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Getting error on embedded dashboard in version 6. [superset]
Posted by "stockarea (via GitHub)" <gi...@apache.org>.
stockarea commented on issue #37551:
URL: https://github.com/apache/superset/issues/37551#issuecomment-3818706791
2026-01-29 16:13:44,607:WARNING:superset.connectors.sqla.models:Query SELECT sortable_month_year AS sortable_month_year
FROM (SELECT
c.document_number AS contract_document_number,
cs.id AS contract_service_id,
cs.month,
cs.year,
CONCAT(cs.year, ' ', cs.month) AS monthly_time,
DATE_FORMAT(STR_TO_DATE(CONCAT(cs.month, ' 1, ', cs.year), '%M %d, %Y'), '%Y-%m') AS sortable_month_year,
cs.category,
cg.status AS group_status,
cg.name AS group_name,
c.type AS contract_type,
w.code AS warehouse_code,
cities.name AS city_name,
CASE
WHEN cs.operation = 'sum'
THEN SUM(cse.transaction)
WHEN cs.operation = 'max'
THEN MAX(SUM(cse.transaction)) OVER (PARTITION BY cs.id, cse.transaction_date)
WHEN cs.operation = 'min'
THEN MIN(SUM(cse.transaction)) OVER (PARTITION BY cs.id, cse.transaction_date)
ELSE 0
END AS total_transaction,
cs.price AS price_per_unit,
cs.operation,
cs.prorata
FROM contract_groups AS cg
LEFT JOIN (
SELECT
*
FROM contract
WHERE
(
contract_document_number IN (
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
)
)
) AS c
ON c.group_id = cg.id
LEFT JOIN contract_services AS cs
ON c.id = cs.contract_id AND cs.deleted_at IS NULL
LEFT JOIN contract_service_executions AS cse
ON cs.id = cse.contract_service_id
LEFT JOIN warehouses AS w
ON cg.warehouse_id = w.id
LEFT JOIN (
SELECT
*
FROM cities
WHERE
(
contract_document_number IN (
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
)
)
) AS `cities`
ON w.cities_id = cities.id
WHERE
cg.status = 'active'
AND STR_TO_DATE(CONCAT(cs.month, ' 1, ', cs.year), '%M %d, %Y') BETWEEN DATE_SUB(DATE_FORMAT(CURRENT_DATE, '%Y-%m-01'), INTERVAL '6' MONTH) AND LAST_DAY(DATE_SUB(CURRENT_DATE, INTERVAL '1' MONTH))
GROUP BY
c.id,
cs.month,
cs.year,
cs.id,
cs.operation,
cs.category,
price_per_unit,
cs.prorata,
cg.id
ORDER BY
contract_service_id DESC) AS virtual_table
WHERE (contract_document_number In (1,2,3,4,5,6,7,8,9,10,11)) GROUP BY sortable_month_year ORDER BY sortable_month_year DESC
LIMIT 1000 on schema stockarea_dw failed
Traceback (most recent call last):
File "/app/superset/connectors/sqla/models.py", line 1652, in query
df = self.database.get_df(
File "/app/superset/models/core.py", line 709, in get_df
self.db_engine_spec.execute(cursor, sql_, self)
File "/app/superset/db_engine_specs/base.py", line 1855, in execute
raise cls.get_dbapi_mapped_exception(ex) from ex
File "/app/superset/db_engine_specs/base.py", line 1851, in execute
cursor.execute(query)
File "/app/.venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
File "/app/.venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/app/.venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 265, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1054, "Unknown column 'contract_document_number' in 'where clause'")
I have got the query and here is error.
Why it is trying to have contract_document_number in between the query? It should only apply at the end right??
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org