LoslegenKostenlos loslegen

Determine the column names of a table

The video lesson showed how to run an SQL query. It also showed how to inspect the column names of a Spark table using SQL. This is important to know because in practice relational tables are typically provided without additional documentation giving the table schema.

Don't hesitate to refer to the slides available at the right of the console if you forget how something was done in the video.

Diese Übung ist Teil des Kurses

Introduction to Spark SQL in Python

Kurs anzeigen

Anleitung zur Übung

  • Use a DESCRIBE query to determine the names and types of the columns in the table schedule.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Inspect the columns in the table schedule
spark.sql("____ ____").show()
Code bearbeiten und ausführen