I’m using Spark SQL. Table A contains two columns – CVEs
, KEV
. Table B contains column CVE
. I would like to set A.KEV
to 'True'
if A.CVEs
contains B.CVE
(not equals). In SQL Server, this would be something like
UPDATE A
SET KEV = 'True'
FROM A
JOIN B ON A.CVEs LIKE '%' + B.CVE + '%'
How can I convert this to Spark SQL, which throws an error for the above code, since the UPDATE…SET…FROM syntax is seemingly unsupported?