简体   繁体   中英

Switch between %python variables and %sql variables in Databricks

I'm trying to switch between %python variables and %sql variables in Databricks SQL notebook.

Let's imagine this situation -

%python 
url_var = 'https://www.example.org/localdata_2020_01_01.csv'
%sql 
SET url_sql_var = $(url_var)
-- This doesn't work as expected

But this doesn't work because I'm not sure how to switch between Python & SQL variables in Databricks SQL notebooks.

Kindly help.

this is not possible. this is the way Databricks notebook has been configured. You can check my answer here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM