sparkmagic
sparkmagic copied to clipboard
parameterized %%sql queries
I'm curious how I can dynamically craft the SQL query given to %%sql. e.g. in pseudo.. SELECT * FROM ${db}.${table}
A similar question would be passing parameterized values from the local context to the query. e.g. in pseudo...
%sql -p1 "The Cranberries"
SELECT artist, count(*) AS num_concerts
FROM concerts
WHERE artist = ?
GROUP BY artist
If it is not implemented yet, what would be the complexity?
Agree, it'd be very usefull to have this parametrization