01-23-2024 06:52 AM
Hi, i am trying to pass catalog name as a parameter into query for sql task, and it pastes it with single quotes, which results in error. Is there a way to pass raw value or other possible workarounds?
query:
INSERT INTO {{ catalog }}.pas.product_snapshot
SELECT ...
task parameters
{ "catalog": "dev" }
error message:
[PARSE_SYNTAX_ERROR] Syntax error at or near ''dev''.(line 1, pos 12) == SQL == INSERT INTO 'dev'.pas.product_snapshot SELECT ...
Thanks!
01-23-2024 07:05 AM
workaround that worked for me was to create databricks sql query, add enum parameter and use that query in task, instead of git file.
01-23-2024 07:05 AM
workaround that worked for me was to create databricks sql query, add enum parameter and use that query in task, instead of git file.
05-29-2024 04:37 PM
dropdownlist works well, however it doesnt work when i do a dynamic parameter like {{task.name}}.
Any one got a solution?
01-23-2024 08:01 AM
@EdemSeitkh - you may need to populate in a single quote -'{{ catalog }}'. Hopefully, you had created a sql query in DBSQL query editor and it will provide the parameters to populate in the UI itself like below example.
01-24-2024 08:40 AM
@shan_chandra yes, i have created with DBSQL query and it worked fine. Previously it was using direct file from git and had this issue i described.
04-09-2024 03:37 PM
@EdemSeitkh can you elaborate on your workaround? Curious how you were able to implement an enum paramter in DBSQL.
I'm running into this same issue now.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group