daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from pyspark.sql.functions import *
  2.  
  3. # Example 1
  4. fact_df = fact_df.withColumn('colname', trim(col('colname'))).alias('fact_df')
  5.  
  6. # Example 2
  7. fact_df = fact_df.join(dimension_df, trim(col('fact_df.colname') == trim(col('dimension_df.another_colname')), 'left').alias('fact_df')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top