Loading Academy Hub...
Master enterprise performance tuning: the Photon native C++ vectorized execution engine, Predictive I/O, Dynamic File Pruning (DFP), AQE coalesce partitions, and broadcast hash join tuning.
[!NOTE] Databricks compute costs are driven by DBU consumption. This playbook covers hardware and software acceleration technologies that deliver 3x to 5x speedups while cutting total cloud infrastructure spend.
udf() calls with native Spark SQL expressions, Arrow UDFs, or built-in higher-order functions (transform, filter) so stages stay 100% inside Photon!min/max/nullCount stats on the first 32 columns by default (delta.dataSkippingNumIndexedCols). Place heavy filter/join keys (tenant_id, event_ts, order_id) inside the first 32 columns (or increase dataSkippingNumIndexedCols) so Photon + Predictive I/O prune 99% of irrelevant Parquet files cleanly..repartition() hints that defeat dynamic file sizing (OptimizeWrite).Review the production code, company interview Q&As, incident traces, and comprehension quiz inside this lesson.
# Enterprise Spark Configuration for Photon-Accelerated Lakehouses
spark.conf.set("spark.sql.adaptive.enabled", "true")
spark.conf.set("spark.sql.adaptive.coalescePartitions.enabled", "true")
spark.conf.set("spark.sql.adaptive.skewJoin.enabled", "true")
# Dynamic File Pruning (DFP) on non-partitioned join keys
spark.conf.set("spark.databricks.optimizer.dynamicFilePruning", "true")
# Broadcast join threshold tuning (increase to 64MB for high-memory clusters)
spark.conf.set("spark.sql.autoBroadcastJoinThreshold", 64 * 1024 * 1024)PhotonDisabledReason: Expression 'custom_python_udf' is not supported in Photon.