Closed bionexit closed 2 months ago
The error you're encountering suggests that the template variables {{ from_dttm }}
and {{ to_dttm }}
are not being correctly replaced with their intended datetime values in your SQL query. This issue could stem from a few different areas:
Template Rendering: Ensure that the datetime format for from_dttm
and to_dttm
is correctly recognized and that these variables are properly defined in the template's context. If the variables are missing or incorrectly formatted, they won't be replaced in the query.
Jinja Syntax: Verify the Jinja syntax in your SQL query. Incorrect syntax could prevent the template from rendering correctly, leaving the variables unreplaced.
Superset Configuration: Check if ENABLE_TEMPLATE_PROCESSING
is enabled in your Superset configuration, as disabling this feature could affect template rendering.
Query Logic: To handle cases where from_dttm
and to_dttm
might not be defined (e.g., if the time range filter is cleared), consider adding conditional logic in your Jinja template to include these conditions only when the variables are not None
.
For more detailed troubleshooting, consider enabling more verbose logging in Superset to capture detailed error messages or stack traces. This can provide further insights into the root cause of the issue, whether it's related to the query, template rendering, or database interaction.
If after these checks the issue remains unresolved, it might be beneficial to review the Superset documentation on SQL templating and the configuration of Jinja context variables for additional guidance.
To continue the conversation, mention @dosu.
FYI @liujiwen-up, in case you know anything about this :)
I don't think this is specifically Doris related, actually. I think this applies to saving queries with Jinja in general.
Closing as a duplicate of https://github.com/apache/superset/issues/25786... let's take the conversation (and hopefully a solution!) there.
Bug description
Deploy superset with docker compose, and successfully connected Doris. But When I save the query as dataset. An Fatal error showed as failed.
The following query could be run smoothly.
also i fill the Template parameters as following
How to reproduce the bug
pip install pydoris
inside the superset_appScreenshots/recordings
Error log in
sudo docker logs -f --tail=300 superset_app
Superset version
3.1.3
Python version
3.9
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist