Core Operations

The operation-by-operation reference — the practical half that picks up where the core-concept pages leave off. Each note covers a single PySpark operation (reading, transforming, or writing data), mapped to its Ab Initio component, with syntax and a worked example. If the concepts aren’t solid yet, start with Transformations (what/why), then Transformations vs Actions and Narrow vs Wide Transformations (how they run).

Most of these operations center on the DataFrame — reads produce one, transformations reshape it, writes consume one.

Operations: Spark ↔ Ab Initio

SparkNarrow / WideAb Initio Equivalent
spark.readInput File / Input Table
selectNarrowReformat (select/project fields)
filter / whereNarrowFilter By Expression
withColumnNarrowReformat (derive/add a field)
withColumnRenamedNarrowReformat (rename a field)
dropNarrowReformat (drop a field)
unionNarrowConcatenate
sampleNarrowSample
groupBy / aggWidePartition By Key + Rollup
joinWidePartition By Key + Join
distinctWidePartition By Key + Sort + Dedup Sorted
repartitionWidePartition By Key / Partition By Round-Robin
orderBy / sortWidePartition By Key + Sort
df.writeOutput File / Output Table

(spark.read and df.write are a read and a write, not transformations, so they have no narrow/wide class — hence the .)

0 items under this folder.