Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 12:21 PM
Set is just the equivalent of SQL UPDATE SET, so it sets a value from one table to a value from the expression.
So you can use built-in functions like col or exp:
from pyspark.sql.functions import *
...
set = { 'gender': col('segments_old.segments') + col('updates.segments') }
OR
set = { 'gender': exp('segments_old.segments + updates.segments') }
My blog: https://databrickster.medium.com/