-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jinja template is not working when async query is enabled #16650
Comments
+1. Noticing same behaviour. The second time the chart is reloaded, the url_param gets passed in properly. |
@zhaoyongjie I am also encountering this 422 Error. Is your response also |
I am working on this. this is because the cache-key was incorrect calculation when it applied url_param. |
Hi, I am facing the same kind of issue. I am using the Jinja template variable {{ current_aw_user_id() }} in my queries. SELECT * FROM attendance where id ='{{current_aw_user_id()}}'; I am facing the same "Unexpected error" issue. what could be the issue, I went through multiple posts but didn't find any solution. |
I believe I'm having the same issue in my deployment. The dashboard/chart loads just fine after I refresh the page. |
Hi all... is this still an issue in 3.x that anyone can validate? |
Closing as stale, but happy to revisit/reopen if folks are facing this in 4.x |
Following up from #16412
I tried using jinja template with global async queries(GAQ) enabled in version 1.3.0. I got the same error as stated in here (#14786).
In recent release (v1.3.1rc1), the issue was addressed and it should be fixed. However, I tried to install the new release and enable jinja template as well as GAQ to simulate the previous error. It doesn't throw any error, but now it shows wrong values.
Expected results
GAQ should work with jinja templating and shows correct values.
Actual results
As you can see from the screenshot, the chart returns
0
. However, if you look at the bottom data, it returns4625
(which is the correct one) instead of0
.Screenshots
Looking at the logs it seems the first query (for the chart) pass through the jinja template, but has no context/variable that should be appended, hence it put the value
None
.Just for reference, I used this query for this test.
How to reproduce the bug
url_param
function in jinja template.Environment
(please complete the following information):
1.3.1rc1
3.7.9
14
Checklist
Make sure to follow these steps before submitting your issue - thank you!
The text was updated successfully, but these errors were encountered: