Skip to content

Instantly share code, notes, and snippets.

@RachidAZ
Created January 16, 2022 23:03
Show Gist options
  • Save RachidAZ/472e442bd3c40c11f63d5cc1bb6b4a0b to your computer and use it in GitHub Desktop.
Save RachidAZ/472e442bd3c40c11f63d5cc1bb6b4a0b to your computer and use it in GitHub Desktop.
DateFrame <--> View in PySpark
# create DF from Table/View:
df=spark.sql("select * from {table_view_name}")
#create View from DF:
df.createOrReplaceTempView("{view_name}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment