Repository navigation
Add in-job Step DSL (Source/Transform/Sink) for Spark jobs - #314
Merged
Merged
Conversation
em3s
marked this pull request as draft
May 10, 2026 14:48
This was referenced May 10, 2026
em3s
marked this pull request as ready for review
May 14, 2026 08:21
This was referenced May 15, 2026
… jobs
Introduces the in-job Step model: a job is a DAG of steps composed via a
type-state Scala DSL or an inline YAML `steps:` list.
- `Step` sealed hierarchy — Source (0→1) / Transform (Flow 1→1, Merge N→1,
Split 1→M) / Sink (1→0); the type hierarchy and the steps.{source,
transform,sink} packages mirror each other.
- Type-state `Plan` DSL — `~>`, `+`, `.as`, `fanOut`, `forked("port")`;
invalid wiring fails at compile time, the rest at plan time.
- `Executor` — AST identity memo (a shared upstream materializes once),
fanOut cache/unpersist, per-execution Split memo.
- `PlanValidation` — one structural validator both front-ends reach.
- `StepsRunnerJob` + `StepsBuilder` — build a Plan from YAML; require every
declared Split port to be labeled.
- `ClassResolver` — resolve a step by FQN or by a memoized recursive scan
under the single steps root; reject ambiguous simple names.
- Built-ins: FileSource, SampleSource, SqlTransform, CacheTransform,
FileSink, ShowSink. Tests for each step, the builder, and the DSL.
Inner counterpart to the workflow DSL ADR (#310). Closes #313
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
em3s
added a commit
that referenced
this pull request
May 20, 2026
Dogfoods the Step DSL on a real workload: V2 edge JSON → SqlTransform (prep) → AlsTransform → TopKSimilarityTransform → FileSink. - AlsTransform (Flow 1→1): wraps spark.ml.recommendation.ALS; emits item factors. Implicit-feedback defaults. - TopKSimilarityTransform (Flow 1→1): cosine-similarity self-join + Window top-K, schema (item_id, similar_item_id, score, rank). - conf/als-i2i-experiment.yaml: production-shape workflow. - Spark MLlib added to the pipeline module (compileOnly + testImplementation). Built-ins follow the <function>Transform convention (issue #313); both extend Flow. Sits on top of the Step DSL (#314). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
Author
|
This PR was written largely with AI assistance (Claude Code, Opus 4.7). It implements the Step model to our requirements (#313): the type-state Merging optimistically; any remaining refinements will be handled in follow-ups. |
em3s
added a commit
that referenced
this pull request
May 20, 2026
Dogfoods the Step DSL on a real workload: V2 edge JSON → SqlTransform (prep) → AlsTransform → TopKSimilarityTransform → FileSink. - AlsTransform (Flow 1→1): wraps spark.ml.recommendation.ALS; emits item factors. Implicit-feedback defaults. - TopKSimilarityTransform (Flow 1→1): cosine-similarity self-join + Window top-K, schema (item_id, similar_item_id, score, rank). - conf/als-i2i-experiment.yaml: production-shape workflow. - Spark MLlib added to the pipeline module (compileOnly + testImplementation). Built-ins follow the <function>Transform convention (issue #313); both extend Flow. Sits on top of the Step DSL (#314). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
em3s
added a commit
that referenced
this pull request
May 20, 2026
Dogfoods the Step DSL on a real workload: V2 edge JSON → SqlTransform (prep) → AlsTransform → TopKSimilarityTransform → FileSink. - AlsTransform (Flow 1→1): wraps spark.ml.recommendation.ALS; emits item factors. Implicit-feedback defaults. - TopKSimilarityTransform (Flow 1→1): cosine-similarity self-join + Window top-K, schema (item_id, similar_item_id, score, rank). - conf/als-i2i-experiment.yaml: production-shape workflow. - Spark MLlib added to the pipeline module (compileOnly + testImplementation). Built-ins follow the <function>Transform convention (issue #313); both extend Flow. Sits on top of the Step DSL (#314). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces the in-job Step model for Spark jobs. A job is a DAG of steps composed via either a type-state Scala DSL or an inline YAML
steps:list interpreted byStepsRunnerJob.Steps map onto three pipeline phases, with the middle phase split by arity:
The
Steptype hierarchy and thesteps.{source,transform,sink}package layout mirror each other one-to-one.Inner counterpart to the workflow DSL ADR (#310), which covers job-to-job relationships only.
Closes #313
Changes
Stepsealed hierarchy —Source/Transform(Flow/Merge/Split) /SinkPlanDSL —~>,+,.as,fanOut,forked("port")Executor— AST identity memo,fanOutcache/unpersist, Split per-execution memo, plan-time validationStepsRunnerJob+StepsBuilderfor inline YAML chains; the builder requires every declared Split port to be labeledClassResolver— resolves a step by FQN or, failing that, by a memoized recursive scan under a singlestepsroot for a matching simple name (across subpackages, directories, and jar entries); rejects ambiguous simple namesFileSource,SampleSource,SqlTransform,CacheTransform,FileSink,ShowSinkHow to Test
AI Assistance