{ "cells": [ { "cell_type": "code", "execution_count": 11, "id": "6974daac", "metadata": {}, "outputs": [], "source": [ "from pyspark.sql import SparkSession\n", "from pyspark.context import SparkContext" ] }, { "cell_type": "code", "execution_count": 12, "id": "e72fbe47", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "pyspark.sql.session.SparkSession" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "SparkSession" ] }, { "cell_type": "code", "execution_count": 13, "id": "9333e07a", "metadata": {}, "outputs": [], "source": [ "spark = SparkSession.builder.master(\"local\").appName(\"HelloWorld\").getOrCreate()" ] }, { "cell_type": "code", "execution_count": 14, "id": "adf79021", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
SparkSession - hive
\n", " \n", "SparkContext
\n", "\n", " \n", "\n", "v3.1.1
local[*]
PySparkShell
SparkContext
\n", "\n", " \n", "\n", "v3.1.1
local[*]
PySparkShell