rahul-plavelimana opened a new issue, #35226:
URL: https://github.com/apache/superset/issues/35226
### Bug description
Steps to replicate:
1. Define a chart with some jinja SQLs, referencing columns dynamically
based on a dashboard level filter
2. Keep async enabled
GLOBAL_ASYNC_QUERIES = True
ENABLE_ASYNC_QUERIES = True
3. Load the dashboard
Scenario:
I have a chart in which we have defined a custom metric using jinja SQLs
It looks as below where
`MAX(
{% if filter_values('perfmetrics')|length %}
{% set metric_value = filter_values('perfmetrics')[0] %}
{% if metric_value == 'Total IOPs' %}
vlun_iops_total
{% elif metric_value == 'Read IOPs' %}
vlun_iops_read
{% elif metric_value == 'Write IOPs' %}
vlun_iops_write
{% elif metric_value == 'Total Latency (ms)' %}
vlun_svt_total
{% elif metric_value == 'Read Latency (ms)' %}
vlun_svt_read
{% elif metric_value == 'Write Latency (ms)' %}
vlun_svt_write
{% elif metric_value == 'Total Throughput (MiB/s)' %}
vlun_kbps_total/1024
{% elif metric_value == 'Read Throughput (MiB/s)' %}
vlun_kbps_read/1024
{% elif metric_value == 'Write Throughput (MiB/s)' %}
vlun_kbps_write/1024
{% elif metric_value == 'Total IO Size (KiB)' %}
vlun_iosz_total
{% elif metric_value == 'Read IO Size (KiB)' %}
vlun_iosz_read
{% elif metric_value == 'Write IO Size (KiB)' %}
vlun_iosz_write
{% endif %}
{% endif %}
)`
perfmetrics => This is a list filter at dashboard level, where we can pick
values as 'Total IOPs' / 'Read IOPs' / 'Write IOPs' etc.
Based on the user selection, we select the right database column and
aggregate it. All of the columns are of type "double".
With async disabled, charts are loading fine.
If async is enabled,
<img width="1014" height="465" alt="Image"
src="https://github.com/user-attachments/assets/2653a106-9dbd-408f-a4d6-2684f62705b5"
/>
Superset version: 3.0.0
we are getting "422 UNPROCESSABLE ENTITY", in the UI it shows as unexpected
error with no specific error message string.
Error screenshots are similar to the ones seen in the thread
"https://github.com/apache/superset/issues/34543"
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### 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: [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]