Skip to content

Instantly share code, notes, and snippets.

@ijan10
Created February 27, 2019 15:30
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/43dd164d986e5c1a73831eca20d0c4df to your computer and use it in GitHub Desktop.
Save ijan10/43dd164d986e5c1a73831eca20d0c4df to your computer and use it in GitHub Desktop.
sql_query = '''SELECT col1, col2,… ,count(1) as weight from left_table_name group by col1,col2,… order by weight desc'''
df_join_key_count = spark.sql(sql_query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment