PySpark

Intermediate

Apache Spark is an open-source distributed processing framework for large-scale data processing.

This competency area includes reading multi-format and partitioned data, applying schema-aware transformations, cleaning and deduplicating datasets, joining multiple sources, using Spark SQL, applying window functions, extracting nested fields, performing aggregations, optimizing common DataFrame workflows, validating inputs, and writing partitioned output.

Key Competencies:

  1. Read partitioned and multi-format data - Load CSV, JSON/JSONL, and Parquet data with explicit schemas, read Hive-style partitioned directories, and use path patterns where appropriate. Applicable for Developer, Data Engineer.
  2. Clean and deduplicate messy datasets - Remove duplicate rows, deduplicate by key, handle nulls, normalize string values, and standardize inconsistent input data. Applicable for Developer, Data Engineer.

  3. Parse and normalize timestamps and data types - Convert string fields to typed columns, parse timestamps and dates, handle invalid values, and derive date/time dimensions for analysis. Applicable for Developer, Data Engineer.

  4. Join and reconcile multiple datasets - Use inner, left, semi, and anti joins to combine related datasets, detect missing references, and remove or preserve orphan records based on business rules. Applicable for Developer, Data Engineer.

  5. Use Spark SQL and temporary views - Register DataFrames as temporary views and write SQL queries for filtering, joining, aggregating, and deriving columns. Applicable for Developer, Data Engineer.

  6. Apply window functions - Use partitioned and ordered windows to rank records, select latest records per key, compute running totals, and compare adjacent rows. Applicable for Developer, Data Engineer.

  7. Compute grouped aggregations and derived metrics - Group by one or more keys to calculate counts, distinct counts, sums, averages, rates, and score-based metrics. Applicable for Developer, Data Engineer.

  8. Extract and flatten nested data - Access nested struct and array fields from semi-structured data, explode arrays, and derive event-level flags and counts. Applicable for Developer, Data Engineer.

  9. Optimize common DataFrame workflows - Use caching, repartitioning, coalescing, broadcast joins, and execution-plan inspection to improve common Spark workloads. Applicable for Developer, Data Engineer.

  10. Validate schemas and write partitioned output - Check required columns, handle empty inputs while preserving schemas, and write CSV or Parquet output using partitioning and overwrite/append modes. Applicable for Developer, Data Engineer, Operations.