Hi there Vineet S
create a DataFrame by reading from a source eg csv file etc
Use the createOrReplaceTempView
method to create or replace the view
Create a DataFrame
df = spark.read.csv("path/to/csv/file")
Create or replace the view
df.createOrReplaceTempView("temp1_view")
he DataFrame df
is created by reading a CSV file. The createOrReplaceTempView
method is then used to create or replace a temporary view named "temp1_view"
If this helps kindly accept the answer thanks much.,