QuestionQ261

VerifiedUsing Spark SQL

Which code should be used to show the schema of the Parquet file stored at events_parquet?

Explanation

Spark SQL can query a file directly by specifying its format and path as parquet.<file_path>. The resulting DataFrame’s printSchema() method displays its schema; show() instead displays data rows.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!