SQL Embedded code
Transform the SQL Code embedded in your Scala / Python Code
Embedded SQL Code transformation Samples
Supported Case
# Original in Spark
spark.sql("""MERGE INTO people_target pt
USING people_source ps
ON (pt.person_id1 = ps.person_id2)
WHEN NOT MATCHED BY SOURCE THEN DELETE""")# SMA transformation
spark.sql("""MERGE INTO people_target pt
USING (
SELECT
pt.person_id1
FROM
people_target pt
LEFT JOIN
people_source ps
ON pt.person_id1 = ps.person_id2
WHERE
ps.person_id2 IS NULL
) s_src
ON pt.person_id1 = s_src.person_id1
WHEN MATCHED THEN
DELETE;""")Unsupported Cases
Unsupported Cases and EWI messages
Last updated
