
Ultimate access to all questions.
The code block shown below contains an error. The code block is intended to use SQL to return a new DataFrame containing column storeId and column managerName from a table created from DataFrame storesDF. Identify the error.
Code block:
storesDF.createOrReplaceTempView("stores")
storesDF.sql("SELECT storeId, managerName FROM stores")
storesDF.createOrReplaceTempView("stores")
storesDF.sql("SELECT storeId, managerName FROM stores")
A
The createOrReplaceTempView() operation does not make a Dataframe accessible via SQL.
B
The sql() operation should be accessed via the spark variable rather than DataFrame storesDF.
C
There is the sql() operation in DataFrame storesDF. The operation query() should be used instead.
D
This cannot be accomplished using SQL – the DataFrame API should be used instead.
E
The createOrReplaceTempView() operation should be accessed via the spark variable rather than DataFrame storesDF.