원클릭으로
spark-best-practices
General Apache Spark best practices for scalable, maintainable, and performant DataFrame jobs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
General Apache Spark best practices for scalable, maintainable, and performant DataFrame jobs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | spark-best-practices |
| description | General Apache Spark best practices for scalable, maintainable, and performant DataFrame jobs. |
Use this skill for general Apache Spark guidance when optimizing performance, reliability, and maintainability.
collect(), toPandas(), and large take() in core data paths.coalesce when reducing output partitions.explain() and execution metrics/logs to inspect physical plans and shuffle boundaries.Every Structured Streaming query needs a stable checkpoint location. The checkpoint stores progress metadata and, for stateful queries such as windows, state-store data that Spark needs to recover correctly.
Use shared storage for cluster runs, not local /tmp, because executors must be
able to see the same checkpoint path.
oleander provides spark.oleander.app.state.dir as a shared application state
directory that users can use for streaming checkpoints.
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, count, window
spark = SparkSession.builder.appName("message-counts").getOrCreate()
state_dir = spark.conf.get("spark.oleander.app.state.dir", "").strip()
checkpoint = f"{state_dir.rstrip('/')}/public-stream/checkpoints/message-counts"
events = (
spark.readStream.format("kafka")
.option("kafka.bootstrap.servers", "localhost:9092")
.option("subscribe", "messages")
.load()
)
counts = (
events.selectExpr("CAST(value AS STRING) AS body", "timestamp AS event_time")
.withWatermark("event_time", "1 minute")
.groupBy(window(col("event_time"), "1 minute"))
.agg(count("*").alias("message_count"))
)
query = (
counts.writeStream
.format("console")
.outputMode("append")
.option("checkpointLocation", checkpoint)
.start()
)
query.awaitTermination()
Use lake-query to explore your data; compare seasonal revenue, analyze product changes, count new user signups, or find whatever answers are hidden in your data.
How to submit, monitor, and configure Spark jobs on oleander using MCP, the CLI, and the TypeScript SDK.
Run Polars queries or scripts on oleander, locally or distributed, and save results to the lake catalog.
Engine-agnostic guidance for working with the oleander lake catalog, including naming conventions, catalog hierarchy, and table reference patterns.
Spark-specific patterns for reading and writing oleander lake catalog tables, including append vs overwrite, avoiding driver writes, and reusable table naming.
oleander-specific Spark guidance for connected OpenLineage, collect() pitfalls, and environment variable usage.