jupysql icon indicating copy to clipboard operation
jupysql copied to clipboard

How to use snippet as a string?

Open vanheck opened this issue 11 months ago • 2 comments

Hello, can I use the the snippet as string without use python variable?

%%sql --save mysnip --no-execute
SELECT * FROM B

Manually add parentheses - could be this block obtained?

query = %sqlcmd snippets mysnip
query = '"' + query + '"'

This Works

%%sql
SELECT * jdbc('A', {{query}})

But this not

%%sql
SELECT * jdbc('A', "mysnip")

vanheck avatar Mar 21 '24 16:03 vanheck