dmbaker
New Contributor III

@adrin​ it may not be a parameter to select and not in one sql statement, but it is possible without having to copy and paste:

df1 = spark.createDataFrame([(None, None), (1, None), (None, 2)], ("a", "b"))
display(df1)
df1.createOrReplaceTempView('table1')
%sql
CREATE OR REPLACE TEMPORARY VIEW table2 AS SELECT * FROM table1
%sql
SELECT * FROM table2
df2 = spark.table('table2')
display(df2)

View solution in original post