ComenzarEmpieza gratis

Creating a SparkSession

Let's start with creating a new SparkSession. In this course, you will be usually provided with one, but creating a new one or getting an existing one is a must-have skill!

Este ejercicio forma parte del curso

Introduction to PySpark

Ver curso

Instrucciones del ejercicio

  • Import SparkSession from pyspark.sql.
  • Make a new SparkSession called "my_spark" using SparkSession.builder.getOrCreate().
  • Print my_spark to the console to verify it's a SparkSession.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Import SparkSession from pyspark.sql
from ____ import ____

# Create my_spark
my_spark = SparkSession.builder.appName(____).____

# Print my_spark
____
Editar y ejecutar código