Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
You are given a task to create a table named 'products' from an external CSV file located at '/data/products.csv'. The table should include columns 'product_id', 'product_name', and 'price'. Write the Spark SQL command to achieve this.
A
CREATE TABLE products USING CSV OPTIONS (path '/data/products.csv', header 'true', inferSchema 'true')
B
CREATE TABLE products USING CSV OPTIONS (path '/data/products.csv', header 'false', inferSchema 'true')
C
CREATE TABLE products USING CSV OPTIONS (path '/data/products.csv', header 'true', inferSchema 'false')
D
CREATE TABLE products USING CSV OPTIONS (path '/data/products.csv', header 'false', inferSchema 'false')