I'm using PySpark on my Linux computer. My Spark version is 2.4.4.
I have a small script that initializes the basic entry points, including SparkContext, SQLContext, and SparkSession. This is the code.
from pyspark.sql import SQLContext
sqlContext = SQLContext(sc)
import pyspark.sql.functions as sqlfunc
I don't want to type this every time I open PySpark. Thus, I would like to
a) run this script in my terminal
b) continue working in my PySpark interactive shell
How can I do this?
I read this following thread to learn how to run a PySpark script within my terminal.
https://stackoverflow.com/a/48861241/12170242
It runs the script, but it doesn't open the PySpark shell, so it's not exactly what I want.