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

Jinja templating from comments shows an error in SQL Lab #32044

Open
2 of 3 tasks
geido opened this issue Jan 30, 2025 · 2 comments
Open
2 of 3 tasks

Jinja templating from comments shows an error in SQL Lab #32044

geido opened this issue Jan 30, 2025 · 2 comments
Assignees
Labels
global:jinja Related to Jinja templating preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. preset:bounty Issues that have been selected by Preset and have a bounty attached. sqllab Namespace | Anything related to the SQL Lab

Comments

@geido
Copy link
Member

geido commented Jan 30, 2025

Bug description

  • Go to SQL Lab
  • Use the following query:
with ws1 as ( 
 select 1 as one
)
select * from ws1 --{{ ref('value_date_delinquent_dates')|length }}
  • Run query

Expected results

The query should run without errors

Actual results

This error is returned:

Parameter error: Failed to execute query '5' - 'with ws1 as ( select 1 as one ) select * from ws1 --{{ ref('value_date_delinquent_dates')|length }} ': The query contains one or more malformed template parameters. Please check your query and confirm that all template parameters are surround by double braces, for example, "{{ ds }}". Then, try running your query again.

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.9

Node version

18 or greater

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.
@dosubot dosubot bot added global:jinja Related to Jinja templating sqllab Namespace | Anything related to the SQL Lab labels Jan 30, 2025
@geido geido added preset:bounty Issues that have been selected by Preset and have a bounty attached. preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. labels Jan 30, 2025
@geido
Copy link
Member Author

geido commented Jan 30, 2025


🎉 Preset Bounty Available: $150 USD 🎉

To claim this bounty, please carefully follow the steps below.


📋 Steps to Participate

  1. Review Guidelines:
    Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

  2. Show Your Interest:
    Complete the Preset Bounty Program Survey and comment this issue to express your interest.

  3. Join the Slack Channel:
    After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

  4. Get Assigned:
    To officially start, ensure a Bounty Program Manager has assigned you to this issue.

  5. Submit Your Solution:
    When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

  6. Claim Your Bounty:
    Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1054


💡 Additional Notes

  • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
  • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! 🎉

@b4s36t4
Copy link

b4s36t4 commented Jan 30, 2025

Would love to work on this, can I get assigned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
global:jinja Related to Jinja templating preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. preset:bounty Issues that have been selected by Preset and have a bounty attached. sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

No branches or pull requests

3 participants
@b4s36t4 @geido and others