Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
You have a DataFrame df loaded from a JSON file with columns 'id', 'name', and 'age'. You need to create a temporary view named 'people_view' that can be used in subsequent SQL queries. How would you achieve this using PySpark?
A
df.createOrReplaceTempView('people_view')
B
df.createTempView('people_view')
C
df.createOrReplaceGlobalTempView('people_view')
D
df.createGlobalTempView('people_view')