BaşlayınÜcretsiz Başlayın

Practice query plans

A dataframe text_df is available. This dataframe is registered as a table called table1.

Bu egzersiz

Introduction to Spark SQL in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Run explain on text_df.
  • Run explain on a SQL query that does a "SELECT COUNT(*) as count" on table1.
  • Run explain on a SQL query that counts the number of unique words in table1.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Run explain on text_df
text_df.____()

# Run explain on "SELECT COUNT(*) AS count FROM table1" 
spark.sql("SELECT COUNT(*) AS count FROM table1").____()

# Run explain on "SELECT COUNT(DISTINCT word) AS words FROM table1"
spark.sql("____").____()
Kodu Düzenle ve Çalıştır