Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Import the required libraries and create a SparkSession
object.”
A block of code is set as follows:
from pyspark.sql import SparkSession spark = (SparkSession.builder .appName("read-csv-data") .master(«spark://spark-master:7077») .config(«spark.executor.memory", "512m") .getOrCreate()) spark.sparkContext.setLogLevel("ERROR")
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
builder = (SparkSession.builder .appName("optimize-delta-table") .master("spark://spark-master:7077") .config("spark.executor.memory", "512m")
Any command-line input or output is written as follows:
$ docker-compose stop
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “The Spark UI also has a dedicated Structured Streaming tab, which shows detailed information about your streaming queries, such as input rate, processing rate, latency, state size, and event timeline.”
Tips or important notes
Appear like this.