So, I've created a DataLake view as...
%sql
CREATE OR REPLACE TEMPORARY VIEW CHANGED_POS
AS
SELECT EBELN...
I then want to use the results of this view in my SQL delete statement, deleting records from SQL Server table.
I have written the following, but it appears I can't reference CHANGED_POS in my sql statement...
connectionProperties.put("user", s"${jdbcUsername}")
connectionProperties.put("password", s"${jdbcPassword}")
connectionProperties.setProperty("Driver", driverClass)
val connection = DriverManager.getConnection(jdbcUrl, jdbcUsername, jdbcPassword)
val stmt = connection.createStatement()
val sql = "delete from LANDING_MDP.ZOPEN_PO where EBELN IN (SELECT EBELN FROM CHANGED_POS)"