Skip to content

Instantly share code, notes, and snippets.

@ijan10
Last active February 27, 2019 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijan10/9e6621b776a645bac6967aa988549cdb to your computer and use it in GitHub Desktop.
Save ijan10/9e6621b776a645bac6967aa988549cdb to your computer and use it in GitHub Desktop.
left_df.registerTempTable('left_table_name')
sql_query = '''SELECT l_col ,count(1) as weight from left_table_name group by l_col order by weight desc'''
df_join_weights = spark.sql(sql_query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment