SparkLab/ cheatsheets 0/39 lessons
Cheatsheets

Everything on one page.

PySpark and Spark SQL side by side, the configuration you'll actually tune, what to do when the Spark UI looks wrong, and the AWS Glue essentials — plus every term from the course.

PySpark ↔ Spark SQL

To…Spark SQLPySpark DataFrame API
Pick columnsSELECT order_id, amount * 1.2 AS grossdf.select("order_id", (F.col("amount") * 1.2).alias("gross"))
Filter rowsWHERE status = 'delivered' AND amount > 100df.where((F.col("status") == "delivered") & (F.col("amount") > 100))
NULL checksWHERE country IS NULLdf.where(F.col("country").isNull())
Default a NULLCOALESCE(country, 'unknown')F.coalesce(F.col("country"), F.lit("unknown"))
ConditionalCASE WHEN amount >= 100 THEN 'big' ELSE 'small' ENDF.when(F.col("amount") >= 100, "big").otherwise("small")
Add a columnSELECT *, DATE_FORMAT(order_date, 'yyyy-MM') AS monthdf.withColumn("month", F.date_format("order_date", "yyyy-MM"))
AggregateSELECT status, COUNT(*), SUM(amount) … GROUP BY statusdf.groupBy("status").agg(F.count("*"), F.sum("amount"))
Filter groups… GROUP BY name HAVING COUNT(*) >= 4.agg(F.count("*").alias("n")).where(F.col("n") >= 4)
JoinFROM orders o JOIN customers c ON o.customer_id = c.customer_idorders.join(customers, "customer_id", "inner")
Keep rows with / without a matchLEFT SEMI JOIN … / LEFT ANTI JOIN …a.join(b, "id", "left_semi") / a.join(b, "id", "left_anti")
WindowROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC)F.row_number().over(Window.partitionBy("customer_id").orderBy(F.desc("order_date")))
Sort + top NORDER BY amount DESC LIMIT 10df.orderBy(F.col("amount").desc()).limit(10)
DistinctSELECT DISTINCT countrydf.select("country").distinct()
Query a DataFrame with SQLSELECT … FROM ordersdf.createOrReplaceTempView("orders"); spark.sql("SELECT … FROM orders")

Assumes from pyspark.sql import functions as F, Window. Both forms compile to the same optimised plan.

Configs worth knowing

ConfigDefaultWhat it controls
spark.sql.shuffle.partitions200Partitions after a shuffle (joins, aggregations). AQE can coalesce them at runtime.
spark.sql.autoBroadcastJoinThreshold10 MBTables smaller than this are broadcast for joins; -1 disables auto-broadcast.
spark.sql.adaptive.enabledtrue (3.2+)Adaptive Query Execution: re-plans at stage boundaries using runtime statistics.
spark.sql.adaptive.advisoryPartitionSizeInBytes64 MBTarget size for AQE's post-shuffle partitions — only honoured when spark.sql.adaptive.coalescePartitions.parallelismFirst is false (it's true by default).
spark.sql.adaptive.skewJoin.enabledtrueSplits skewed shuffle partitions in sort-merge joins (> 5× median and > 256 MB).
spark.sql.files.maxPartitionBytes128 MBMaximum bytes packed into one input partition when reading files.
spark.executor.memoryOverheadmax(384 MB, 10%)Off-heap per executor: JVM overhead, Python workers, network buffers.
spark.memory.fraction0.6Share of (heap − 300 MB) for unified execution + storage memory.
spark.memory.storageFraction0.5Part of unified memory protected from eviction for cached data.
spark.dynamicAllocation.enabledfalseScale executors with the task backlog (needs shuffle tracking or an external shuffle service).
spark.sql.execution.arrow.pyspark.enabledtrue (4.2+)Use Apache Arrow for toPandas() / createDataFrame(pandas_df); off by default before Spark 4.2.
spark.sql.ansi.enabledtrue (4.0+)ANSI SQL mode: invalid casts and division by zero raise errors instead of returning NULL.
spark.task.maxFailures4Attempts per task before the job fails.

Defaults as documented for Spark 3.5 and 4.x. Set them with spark.conf.set(…), --conf or, on Glue, the job's --conf parameter.

Ladders to remember

Narrow (same stage)
1 select→2 filter / where→3 withColumn→4 union→5 coalesce(n)
Wide (shuffle → new stage)
1 groupBy().agg()→2 join (non-broadcast)→3 orderBy→4 distinct→5 repartition(n)
Join strategies (usually cheapest first)
1 BroadcastHashJoin→2 ShuffledHashJoin→3 SortMergeJoin→4 BroadcastNestedLoopJoin→5 CartesianProduct
Storage, fastest to scan
1 Parquet / ORC (columnar)→2 Avro (row, binary)→3 JSON / CSV (text)
Catalyst phases
1 Parse→2 Analyze→3 Optimize (logical)→4 Physical plan→5 Code generation
Glue job run states
1 STARTING→2 RUNNING→3 SUCCEEDED→4 FAILED / TIMEOUT / STOPPED

Spark UI triage

You seeLikely causeFirst fixes
One task runs 10× longer than the medianData skew — a hot key in one partitionAQE skew join, salt the key, broadcast the small side, handle NULL keys separately
Thousands of tiny tasks / tiny output filesToo many partitions or partitionBy on a high-cardinality columnLet AQE coalesce, coalesce()/repartition() before write, partition on low-cardinality columns
Spill (memory) / spill (disk) in stage metricsPartitions too big for execution memoryMore shuffle partitions, more memory per core, avoid wide rows
Driver OutOfMemoryErrorcollect() / toPandas() on big data, or a huge broadcastWrite results out, aggregate first, lower the broadcast threshold
Two Exchanges + Sorts on a small-dimension joinSort-merge join where a broadcast would doF.broadcast(dim) or raise autoBroadcastJoinThreshold (if dim stays small)
Glue job reprocesses every file each runBookmarks off, no transformation_ctx, or no job.commit()Enable bookmarks and add both

AWS Glue essentials

every Glue PySpark jobPySpark
import sys
from awsglue.transforms import ApplyMapping
from awsglue.utils import getResolvedOptions
from awsglue.context import GlueContext
from awsglue.job import Job
from pyspark.context import SparkContext

args = getResolvedOptions(sys.argv, ["JOB_NAME"])
glueContext = GlueContext(SparkContext.getOrCreate())
spark = glueContext.spark_session
job = Job(glueContext)
job.init(args["JOB_NAME"], args)        # bookmarks start here
# … read (with transformation_ctx), transform, write …
job.commit()                             # bookmarks advance here
Worker types
TypeDPUPer workerGood for
G.025X0.252 vCPU · 4 GBLow-volume streaming jobs
G.1X14 vCPU · 16 GBDefault for most ETL
G.2X28 vCPU · 32 GBMemory-hungry transforms, ML
G.4X416 vCPU · 64 GBHeavy aggregations and joins
G.8X832 vCPU · 128 GBThe most demanding jobs

Billing is per DPU-hour, per second with a 1-minute minimum on Glue 2.0 and later. Check the AWS Glue docs for the newest worker types and versions.

DynamicFrame toolkit
create_dynamic_frame.from_catalogRead a catalog table (push_down_predicate prunes partitions)
create_dynamic_frame.from_optionsRead S3 / JDBC / … by connection options
ApplyMappingRename and cast columns in one step
ResolveChoiceSettle ambiguous (choice) types: cast, make_cols, make_struct, project
DropNullFieldsDrop fields that are null in every record
RelationalizeFlatten nested JSON into a set of flat tables
SelectFields / Filter / MapProject, filter and map records
toDF() / DynamicFrame.fromDF()Switch to DataFrames for joins, windows and built-in functions — and back
write_dynamic_frame.from_optionsWrite to S3 (partitionKeys), JDBC, …

Glossary

149 terms

Driver

01

The process that runs your main program, creates the SparkSession, plans jobs into stages and tasks, and schedules them on executors.

Executor

01

A JVM process launched on a worker node for one application that runs tasks in parallel slots and holds cached data and shuffle files.

Cluster manager

01

The external service — Spark Standalone, YARN or Kubernetes — that allocates CPU and memory for the driver and executors but never runs your code.

Deploy mode

01

Where the driver runs: in the submitting process (client mode) or inside the cluster, started by the cluster manager (cluster mode).

Job

01

The parallel computation Spark launches in response to an action, made up of one or more stages.

Stage

01

A set of identical tasks that run the same pipelined narrow operations on different partitions; stages are separated by shuffles.

Task

01

The unit of work sent to one executor slot: a stage's code applied to exactly one partition.

Task slot

01

Capacity to run one task at a time — by default one per executor core — so executors × cores sets how many tasks run in parallel.

Partition

01

A chunk of a dataset processed by one task; the number of partitions sets a stage's parallelism.

RDD

01

Resilient Distributed Dataset: an immutable, partitioned collection defined by its partitions, compute function, dependencies, optional partitioner and preferred locations.

Lineage

01

The chain of dependencies recording how each partition was derived from its parents, used to recompute lost partitions instead of replicating data.

Narrow vs wide dependency

01

Narrow: each output partition depends on one input partition (filter, select) and can be pipelined; wide: it depends on many (groupBy, join) and needs a shuffle.

Shuffle

01

The all-to-all redistribution of rows by key across executors, where map tasks write blocks to local disk and reduce tasks fetch them over the network.

DAG

01

The directed acyclic graph of operations behind a job, which the DAGScheduler cuts into stages at shuffle boundaries.

Lazy evaluation

01

Spark's model of recording transformations as a plan and executing nothing until an action needs a result.

Transformation

01

An operation such as filter, select, groupBy or join that returns a new DataFrame or RDD and only extends the plan.

Action

01

An operation such as count, collect, show or write that needs a result and therefore triggers a job.

Data locality

01

How close a task runs to its data — PROCESS_LOCAL, NODE_LOCAL, NO_PREF, RACK_LOCAL or ANY — with spark.locality.wait (3 s) before each fallback.

Unified memory

01

The heap region of (heap − 300 MB) × spark.memory.fraction (0.6) shared by execution and storage, with spark.memory.storageFraction (0.5) protected for cached blocks.

Memory overhead

01

Non-heap memory added to each executor container — default max(384 MB, 10% of the heap) — for JVM native memory and, in PySpark, Python workers.

Storage level

01

How persist() keeps a dataset — in memory, on disk, serialised or replicated — e.g. MEMORY_AND_DISK_DESER, the DataFrame cache() default.

Broadcast variable

01

A read-only value shipped once to each executor and cached there, instead of being serialised into every task.

Accumulator

01

A shared variable that tasks can only add to and the driver can read; updates are guaranteed exactly once only inside actions.

Dynamic allocation

01

Scaling the number of executors up when tasks queue and down when executors sit idle, enabled with spark.dynamicAllocation.enabled.

External shuffle service

01

A long-running per-node process that serves shuffle files so they survive executor removal; not available on Kubernetes.

Py4J

02

The library PySpark uses to call JVM objects from Python over a local socket; on a classic PySpark driver every DataFrame call goes through it.

Python worker

02

A Python process an executor starts only when a task needs Python — a Python UDF, pandas UDF or RDD lambda — and exchanges serialised data with over a local socket.

SparkSession

02

The entry point to the DataFrame and SQL APIs; SparkSession.builder…getOrCreate() returns the active session or starts a new application.

DataFrame

02

An immutable, distributed table of rows with a named, typed schema, built lazily as a plan and executed when an action runs.

Row

02

The object a DataFrame record becomes on the driver (from collect, take or first), readable like a named tuple: row.qty, row["qty"] or row.asDict().

Schema

02

The column names, data types and nullability of a DataFrame, given as a StructType or a DDL string such as "id STRING, amount DOUBLE".

StructType

02

The Spark type for a schema or a nested record: an ordered list of StructField(name, dataType, nullable) entries.

Schema inference

02

Letting Spark guess column types from the data, which for CSV and JSON costs an extra pass over the input and can produce different types from run to run.

Save mode

02

What a DataFrame write does when the target already exists: error / errorifexists (the default), append, overwrite or ignore.

Column expression

02

An unevaluated expression tree such as F.col("a") * 2 or F.when(…) that Spark evaluates for each row inside the JVM when the plan runs.

Python UDF

02

A user-defined function that runs your Python code once per row in a Python worker; it is opaque to the optimizer, so filters on it can't be pushed down.

pandas UDF

02

A vectorised UDF declared with @pandas_udf and type hints that receives Arrow batches as pandas Series or DataFrames and runs once per batch.

Apache Arrow

02

A columnar in-memory format PySpark uses to move data efficiently between the JVM and Python for pandas UDFs, toPandas() and createDataFrame(pandas_df).

explode

02

A generator function that turns each element of an array (or entry of a map) into its own row, dropping rows whose array is empty or null — explode_outer keeps them.

Higher-order function

02

An array function such as transform, filter, exists or aggregate that applies a lambda-built expression to every element without exploding the array.

from_json

02

A function that parses a JSON string column into a struct, map or array using a schema you supply.

Window function

02

A function such as row_number, rank, lag or a windowed sum that computes a value for each row over related rows defined by Window.partitionBy().orderBy(), without collapsing them.

Left anti join

02

A join that keeps only the left rows with no match on the right, returning only the left columns — the standard check for orphaned keys.

Micro-batch

02

One incremental Spark job in a Structured Streaming query that processes the data that arrived since the previous trigger.

Output mode

02

What a streaming query writes on each trigger: append (new rows that are final), update (rows that changed) or complete (the whole result table).

Watermark

02

A moving event-time threshold, set with withWatermark, that tells Spark how late data may arrive so it can finalise windows and drop old state.

availableNow trigger

02

A streaming trigger that processes everything available when the query starts, in rate-limited micro-batches, and then stops — an incremental batch job.

Checkpoint location

02

The durable directory where a streaming query records offsets, commits and state so it can resume exactly where it stopped after a failure or restart.

foreachBatch (Structured Streaming)

02

A streaming sink that calls your function with each micro-batch as a regular DataFrame plus its batch_id, so you can use any batch writer.

Spark Connect

02

The client-server protocol (Spark 3.4+) in which a thin client sends unresolved logical plans over gRPC to a remote Spark server and receives results as Arrow batches.

Temp view

03

A session-scoped name for a DataFrame's query plan, created with createOrReplaceTempView or CREATE TEMPORARY VIEW, that SQL can query; no data is copied and the name disappears with the session.

Global temp view

03

A view created with createGlobalTempView that every session of the application can see, stored in the system database global_temp and queried as global_temp.<name> until the application stops.

Managed table

03

A metastore table whose files Spark writes under the warehouse directory (spark.sql.warehouse.dir) and owns, so DROP TABLE deletes the data as well as the definition.

External table

03

A metastore table defined over files at a LOCATION (or a path option) that Spark doesn't own; DROP TABLE removes only the metadata and leaves the files in place.

Metastore

03

The persistent catalog of databases, tables, schemas, file locations and partitions that Spark consults for non-temporary tables — a Hive metastore, or the AWS Glue Data Catalog on EMR and Glue.

Three-valued logic

03

SQL's logic of TRUE, FALSE and NULL (unknown), in which any comparison with NULL yields NULL and WHERE, HAVING and join conditions keep only the rows that evaluate to TRUE.

Null-safe equality (<=>)

03

The <=> operator (eqNullSafe in PySpark), which returns TRUE when both sides are NULL and FALSE when only one is, so it never returns NULL.

HAVING

03

The clause that filters groups after aggregation using aggregate values, unlike WHERE, which filters individual rows before grouping.

GROUPING SETS

03

A GROUP BY extension that computes several groupings in one query and stacks the results; ROLLUP(a, b) and CUBE(a, b) are shorthands for common sets of groupings.

Partial aggregation

03

The first phase of a distributed aggregate, in which each task pre-aggregates its own rows per key (partial_sum, partial_count) so that at most one row per key per task is shuffled to the final aggregate.

Semi join

03

A join (LEFT SEMI JOIN, how="left_semi") that returns each left row that has at least one match on the right, once, with only the left side's columns.

Anti join

03

A join (LEFT ANTI JOIN, how="left_anti") that returns the left rows that have no match on the right, with only the left side's columns.

Window frame

03

The subset of a window partition, relative to the current row, that a window aggregate uses — for example ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW for a running total.

CTE (common table expression)

03

A named intermediate result, WITH name AS (query), that the rest of one SQL statement can reference; Spark inlines it into the plan rather than storing it.

Scalar subquery

03

A subquery in parentheses that returns a single value (at most one row with one column) and can be used like a literal in SELECT, WHERE or HAVING.

Catalyst optimizer

03

Spark SQL's extensible query optimiser, which analyses, rewrites and physically plans both SQL and DataFrame queries using rule-based and cost-based techniques.

Analyzer

03

The Catalyst phase that resolves table, column and function names against the catalog and checks types, turning an unresolved logical plan into an analyzed one.

Logical plan

03

A tree of relational operators such as scan, filter, project, join and aggregate that describes what a query computes, independent of how it will be executed.

Physical plan

03

The executable form of a query, made of concrete operators such as FileScan, HashAggregate, SortMergeJoin and Exchange chosen by the physical planner.

Predicate pushdown

03

An optimisation that moves filters as close to the data as possible — below joins and into the data source reader, where Parquet can use them to skip row groups.

Column pruning

03

An optimisation that removes columns no operator needs, so a columnar source such as Parquet reads only the columns listed in the scan's ReadSchema.

Constant folding

03

An optimisation that evaluates expressions made only of literals, such as 2 * 5, once at planning time instead of once per row.

Whole-stage codegen

03

The technique of fusing a chain of physical operators into one generated Java function compiled at run time, shown as *(n) markers in explain output.

Tungsten

03

Spark's execution-engine work on memory and CPU efficiency: compact binary rows (UnsafeRow) in Spark-managed memory, cache-aware algorithms and whole-stage code generation.

EXPLAIN

03

The SQL statement (DataFrame.explain() in PySpark) that prints a query's plans; its modes include EXTENDED, CODEGEN, COST and FORMATTED.

Adaptive Query Execution (AQE)

04

Spark SQL's runtime re-optimisation (spark.sql.adaptive.enabled, on by default since 3.2) that re-plans the rest of a query after each shuffle or broadcast stage, using measured sizes.

Broadcast hash join

04

A join that copies the small side to every executor as a hash table so the large side is joined in place without a shuffle; automatic below spark.sql.autoBroadcastJoinThreshold (10 MB).

Sort-merge join

04

Spark's default join for large equi-joins: both sides are shuffled by the join key and sorted, then merged partition by partition.

Shuffled hash join

04

A join that shuffles both sides by key and builds a hash table from the smaller side of each partition, skipping the sorts of a sort-merge join.

Broadcast nested loop join

04

The fallback for joins without an equality condition: one side is broadcast and every row is compared with every broadcast row.

Join hint

04

An instruction such as /*+ BROADCAST(t) */, MERGE, SHUFFLE_HASH or SHUFFLE_REPLICATE_NL (or df.hint(...)) asking Spark to use a specific join strategy for a relation.

Data skew

04

An uneven distribution of rows across partitions, usually from a hot key, that makes a few tasks far bigger and slower than the rest.

Salting

04

Adding a random sub-key (0…N-1) to a hot key on the big side, and replicating the other side N times, so one key's rows spread over N partitions.

Straggler

04

A task that runs much longer than the others in its stage and holds up the whole stage, caused by skew, a slow node or GC.

Spill

04

Data written from execution memory to local disk when a task's sort, aggregation or join buffers don't fit, shown as Spill (Memory) and Spill (Disk) in the Spark UI.

coalesce

04

A DataFrame method that reduces the number of partitions by merging existing ones without a shuffle, lowering the parallelism of the stage it belongs to.

repartition

04

A DataFrame method that shuffles data into a given number of partitions, round-robin or hashed by the given columns.

Small-files problem

04

Tables made of many tiny files, often from partitioned writes (files ≈ tasks × partition values), that slow down listing, opening and scanning for every reader.

Partition pruning

04

Skipping whole partition directories (such as dt=2025-06-01/) whose values can't match a filter on the partition column, shown as PartitionFilters in the scan.

Dynamic partition pruning

04

A Spark 3.0+ optimisation that uses a filtered dimension's join keys at runtime to prune partitions of a fact table partitioned by the join key.

Bucketing

04

Hash-distributing a table into a fixed number of buckets at write time (bucketBy + saveAsTable) so later joins and aggregations on the bucket column need no shuffle.

Parquet row group

04

A horizontal slice of a Parquet file holding one column chunk per column, with min/max statistics a reader uses to skip it.

Columnar format

04

A file format such as Parquet or ORC that stores each column's values together, so queries read only the columns they need and compress better.

Table format

04

A metadata layer such as Apache Iceberg, Delta Lake or Apache Hudi on top of data files that adds atomic commits, schema evolution, time travel and file-level statistics.

Speculation

04

Re-launching a copy of a task that runs much slower than its stage's median (spark.speculation, off by default) and keeping whichever copy finishes first.

Checkpoint

04

Saving a DataFrame to reliable storage with checkpoint(), or on executors with localCheckpoint(), to truncate a long lineage.

Kryo

04

A serializer (spark.serializer = KryoSerializer) that is faster and more compact than the default Java serialization, mainly useful for RDD code.

History server

04

A Spark service (port 18080 by default) that rebuilds the web UI of finished or crashed applications from their event logs.

Event log

04

The record of an application's scheduler and task events that Spark writes when spark.eventLog.enabled is true, read by the history server.

AWS Glue

05

AWS's serverless data integration service: a metadata catalog, schema-discovering crawlers, managed Spark and Python jobs, and triggers and workflows to run them.

Data Catalog

05

Glue's persistent, Hive-metastore-compatible metadata store (one per AWS account per Region) that holds databases, tables, partitions and connections.

Catalog database

05

A logical group of table definitions in the Data Catalog; it holds metadata only, never data.

Catalog table

05

Metadata describing a dataset (columns, partition keys, location, input/output format, SerDe and parameters such as classification), versioned on every update.

Partition index

05

A Data Catalog index on a subset of a table's partition keys (up to 3 per table) that lets GetPartitions fetch matching partitions instead of loading them all.

Crawler

05

A Glue program that connects to a data store, runs classifiers to infer formats and schemas, and creates or updates tables and partitions in the Data Catalog.

Classifier

05

Logic that recognises a data format and returns a schema and a certainty score; a crawler tries custom classifiers first, then the built-in ones.

Grok pattern

05

A pattern of named building blocks such as %{TIMESTAMP_ISO8601:ts} that a custom grok classifier uses to split text log lines into columns.

Schema change policy

05

Crawler setting for detected schema changes (UPDATE_IN_DATABASE or LOG) and for deleted objects (LOG, DEPRECATE_IN_DATABASE or DELETE_FROM_DATABASE).

Recrawl policy

05

Crawler setting for runs after the first: crawl everything, crawl only new folders, or crawl only the folders named in S3 event notifications.

DPU

05

Data Processing Unit: 4 vCPU and 16 GB of memory, the unit Glue capacity and billing are measured in (billed per DPU-hour).

Worker type

05

The size of each Glue worker (G.025X, G.1X, G.2X, G.4X, G.8X, G.12X, G.16X or memory-optimised R.1X–R.8X); each Spark worker hosts one executor or the driver.

Glue version

05

Job setting that pins the runtime, for example Glue 4.0 = Spark 3.3.0 with Python 3.10 and Glue 5.0 = Spark 3.5.4 with Python 3.11.

Flex execution

05

A lower-priced execution class for Glue 3.0+ Spark jobs on G.1X or G.2X workers that runs on spare capacity, so start and finish times vary.

Auto scaling (Glue)

05

Glue 3.0+ option in which the number of workers is a maximum and Glue adds or removes executors with demand, billing each worker only while it runs.

Job run

05

One execution of a Glue job with its own run ID, arguments, freshly provisioned workers and state (STARTING, RUNNING, SUCCEEDED, FAILED, TIMEOUT, STOPPED…).

Trigger

05

A Glue object that starts jobs or crawlers on a cron schedule, on demand, when watched jobs or crawlers reach given states, or (for workflows) on EventBridge events.

Workflow

05

A Glue graph of triggers, crawlers and jobs with a single start trigger, run, monitored and resumed as one unit.

Run properties

05

Name/value pairs attached to a workflow run that its jobs can read and overwrite to pass small control values to later steps.

Glue connection

05

A Data Catalog object holding what's needed to reach a data store (JDBC URL, Secrets Manager secret, subnet and security groups); Glue uses it to place ENIs in your VPC.

Security configuration

05

A named set of encryption settings attached to jobs and crawlers that covers S3 output (SSE-S3 or SSE-KMS), CloudWatch logs and job bookmarks.

Lake Formation

05

AWS service that adds database-, table-, column- and row-level permissions on Data Catalog resources and vends scoped S3 credentials to Glue, Athena, Redshift Spectrum and EMR.

Glue Studio

05

The Glue console's authoring environment: a visual job editor that generates scripts, a script editor, notebooks and job run monitoring.

Interactive session

05

An on-demand serverless Spark backend that notebooks and IDEs use to run Glue code cell by cell, billed per second with a 1-minute minimum.

Glue Data Quality

05

Serverless data quality checks written in DQDL that run against catalog tables or inside ETL jobs, built on the open-source Deequ framework.

GlueContext

06

The awsglue class that wraps a SparkContext and adds Glue readers, writers, connections and the Glue logger; glueContext.spark_session gives the SparkSession.

Job (awsglue.job)

06

The object whose init() loads a job's bookmark state at the start of a script and whose commit() saves it atomically at the end.

getResolvedOptions

06

The awsglue.utils function that returns the job parameters you name, such as JOB_NAME or input_path, as a dict read from sys.argv.

DynamicFrame

06

Glue's distributed collection of self-describing records whose schema is computed on demand and can hold choice types; convert with toDF() and DynamicFrame.fromDF().

DynamicRecord

06

One self-describing record in a DynamicFrame, like a DataFrame row that carries its own field names and types.

Choice type

06

A union type in a DynamicFrame schema that records a field holding values of more than one type, such as double and string.

ResolveChoice

06

The Glue transform that turns choice types into one type per field with cast, project, make_cols, make_struct or MATCH_CATALOG.

ApplyMapping

06

The Glue transform that renames, casts and selects fields from (source, type, target, type) tuples, dropping fields that are not listed.

Relationalize

06

The Glue transform that flattens nested structs and pivots arrays into child tables, returning a collection of flat frames linked by join keys.

DropNullFields

06

The Glue transform that removes fields whose type is null, meaning they are missing or null in every record.

transformation_ctx

06

A unique, stable name on a Glue source, transform or sink that keys its state in the job bookmark.

Job bookmark

06

State Glue persists per job between runs, one entry per transformation_ctx, so incremental runs read only new S3 objects or JDBC rows.

Bookmark key

06

The JDBC column or columns (the primary key by default, or jobBookmarkKeys) whose saved values decide which rows are new; each must be strictly monotonic.

Push-down predicate

06

A Spark SQL condition on partition columns, passed as push_down_predicate, that Glue applies to the catalog's partitions before listing files in S3.

catalogPartitionPredicate

06

An additional_options filter that the Data Catalog evaluates server-side with partition indexes, so only matching partitions are returned to the job.

groupFiles

06

An S3 connection option that, set to inPartition with an optional groupSize in bytes, reads many small row-format files as one task per group.

partitionKeys

06

A Glue S3 sink option listing the columns used to write Hive-style key=value folders.

enableUpdateCatalog

06

A Glue sink option that makes the job create or update the catalog table and register new partitions as it writes, without a crawler.

Glue Parquet writer

06

Glue's Parquet writer for DynamicFrames, enabled with useGlueParquetWriter (formerly format glueparquet), which computes the schema while writing.

forEachBatch

06

The GlueContext method a streaming job uses to run a function on every micro-batch, with windowSize and checkpointLocation as required options.

checkpointLocation

06

The S3 path where a Glue streaming job records how far it has read, so a restarted job resumes where it stopped.

Session magics

06

Jupyter magics such as %glue_version, %worker_type, %number_of_workers and %idle_timeout that configure a Glue interactive session before it starts.

Glue Docker image

06

The official public.ecr.aws/glue/aws-glue-libs container with the Glue ETL library and Spark, used to run Glue scripts and pytest locally.

DQDL

06

Data Quality Definition Language, the rule language of Glue Data Quality, for example Rules = [IsComplete "order_id", ColumnValues "amount" > 0].

EvaluateDataQuality

06

The awsgluedq transform that evaluates a DQDL ruleset against a DynamicFrame and returns one outcome per rule, optionally publishing CloudWatch metrics.