Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pyspark.sql.functions import *
- # Example 1
- fact_df = fact_df.withColumn('colname', trim(col('colname'))).alias('fact_df')
- # Example 2
- fact_df = fact_df.join(dimension_df, trim(col('fact_df.colname') == trim(col('dimension_df.another_colname')), 'left').alias('fact_df')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement