Skip to content

Commit 1f162c5

Browse files
committed
fix: get spark job name properly into open lineage data
1 parent df44159 commit 1f162c5

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

stacks/openlineage/airflow.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,16 @@ data:
262262
},
263263
"s3connection": {"reference": "minio"},
264264
"sparkConf": {
265-
# CLEAN-LINEAGE KNOB #3: set spark.app.name as a Spark *config* (not only via
266-
# SparkSession.builder.appName in the script). The OpenLineage listener reads the app
267-
# name when the SparkContext starts; if it's only set later by the builder, the listener
268-
# has already stamped `null`/`unknown`. Setting it here yields a stable job name.
265+
# CLEAN-LINEAGE KNOB #3: pin the OpenLineage job name.
266+
# `spark.app.name` alone is NOT enough: the OL listener resolves the job name via
267+
# SparkContext.appName() at context-build time, which in cluster mode (esp. on the
268+
# not-yet-officially-covered Spark 4.1) is intermittently still blank -> it falls back
269+
# to the literal "unknown" (observed: same config produced both `orders_by_nation` and
270+
# `unknown` across runs). `spark.openlineage.appName` is parsed straight from SparkConf
271+
# at listener construction (highest-priority job-name provider, timing-independent), so
272+
# it wins unconditionally. Keep spark.app.name too for the Spark UI / general naming.
269273
"spark.app.name": "orders-by-nation",
274+
"spark.openlineage.appName": "orders-by-nation",
270275
# --- Iceberg catalog `lakehouse` on the shared hive-iceberg metastore ---
271276
"spark.sql.extensions": "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions",
272277
"spark.sql.catalog.lakehouse": "org.apache.iceberg.spark.SparkCatalog",

0 commit comments

Comments
 (0)