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

Widgets in SparkSQL #190

Closed
fmqeisfeld opened this issue May 15, 2024 · 1 comment
Closed

Widgets in SparkSQL #190

fmqeisfeld opened this issue May 15, 2024 · 1 comment

Comments

@fmqeisfeld
Copy link

Hi, first of all. Thanks for this wonderful extension. Many of my colleagues use it in their daily work.
However, I've encountered a problem when trying to use a widget in SparkSQL, for example I have

CREATE WIDGET TEXT ENVIRONMENT DEFAULT "_DEV"

in my first cell. This works fine. The second cell reads

SELECT * from testcatalog${ENVIRONMENT}.testschema.testtable;

which results in the following error:

[PARSE_SYNTAX_ERROR] Syntax error at or near ''_DEV''. SQLSTATE: 42601
Error: org.apache.spark.sql.catalyst.parser.ParseException: 
[PARSE_SYNTAX_ERROR] Syntax error at or near ''_DEV''. SQLSTATE: 42601 (line 1, pos 25)

== SQL ==
SELECT * from testcatalog'_DEV'.testschema.testtable

That is, the evaluation of ${WIDGETNAME} adds two single quotes around the value of the variable.
Am I missing something or is this unexpected behavior?

@gbrueckl
Copy link
Collaborator

yes, thats unexpected behavior as it differs from how the Databricks Web UI works

I just fixed it and published v2.3.2 to the marketplace
should be available within the next 15 minutes

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

2 participants