Open vanheck opened 7 months ago
hi, can you expand?
up until this point, this works:
%%sql --save mysnip --no-execute
SELECT * FROM B
query = %sqlcmd snippets mysnip
query = '"' + query + '"'
and this also works:
%%sql
SELECT * jdbc('A', {{query}})
so I guess what you're asking is if you can do this:
%%sql
SELECT * jdbc('A', "mysnip")
and have "mysnip", expanded to the actual query? if that's what you mean, it isn't possible.
I like to have sql code highlighting. But second parameter in jdbc function is (sql) string that not sql highlighted.
One cell without highlighting:
%%sql
SELECT * jdbc('A', "SELECT * FROM B")
To use highlighted SQL, I split to two cells, but it doesnt work.
First
%%sql --save mysnip --no-execute
SELECT * FROM B
And second:
%%sql
SELECT * jdbc('A', "mysnip")
Why I cannot use "mysnip"
Or \"mysnip\"
?
Any progress?
The team is at capacity, we'd appreciate a PR!
Hello, can I use the the snippet as string without use python variable?
Manually add parentheses - could be this block obtained?
This Works
But this not