I want to define a variable and use it in a query, like below:
%sql
SET database_name = "marketing";
SHOW TABLES in '${database_name}';
However, I get the following error:
ParseException:
[PARSE_SYNTAX_ERROR] Syntax error at or near ''''(line 1, pos 15)
== SQL ==
SHOW TABLES in ''
I am aware that I can use "spark.sql("query")" and python f-string. But, I would like to know how to use SQL for this purpose.
Thanks.