Skip to content
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

Non-descriptive error when saving Dataset from SQL Lab with JINJA placeholder present #26876

Closed
3 tasks done
maxgillmaxgill opened this issue Jan 30, 2024 · 4 comments
Closed
3 tasks done

Comments

@maxgillmaxgill
Copy link

Bug description

I get a "FATAL ERROR" when I try to save a dataset from SQL Lab that looks like this:

SELECT COL_ID as ID, COL_DESCRIPTION as DESCRIPTION, COL_CREATEDDATE as CREATEDDATE, COL_TAG as TAG, COL_VIEWCOUNT as VIEWCOUNT FROM {{ecx_schema}}.tbl_kbtag

But I don't get an error if I save it like this:
SELECT COL_ID as ID, COL_DESCRIPTION as DESCRIPTION, COL_CREATEDDATE as CREATEDDATE, COL_TAG as TAG, COL_VIEWCOUNT as VIEWCOUNT FROM my_schema.tbl_kbtag

While it would be good to be able to save these datasets and pre-populate the jinja params in the new dataset, simply explaining the error instead of "Fatal Error" would be a good start.

How to reproduce the bug

  1. Go to SQL Lab
  2. Create an SQL query with the schema name in a Jinja template
  3. Click Save Dataset

Screenshots/recordings

image

Superset version

3.0.3

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • 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.
@qleroy
Copy link
Contributor

qleroy commented Jan 30, 2024

relevant discussion #25786

@rusackas
Copy link
Member

Adding a link the relevant PR that would likely close this (I think?)

#27796

@amosanurag
Copy link

amosanurag commented Jun 20, 2024

The issue appears when you try to use jinja templating and save the query in SQLLab as a dataset. If you save the dataset and provide a default value in place of using any jinja templates.Then during the chart development process, you can make updates to the query and enter your jinja template. This won't lead to errors.

@rusackas
Copy link
Member

Closing as a duplicate of #25786... let's take the conversation (and hopefully a solution!) there.

@rusackas rusackas closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants