Spark Declarative Pipeline
laktory.models.pipeline.SparkDeclarativePipelineOrchestrator
¤
Bases: PipelineChild
Spark Declarative Pipeline used as an orchestrator to execute a Laktory
pipeline locally (via spark-pipelines run) or as a plain Databricks Job
task on DBR 16.x.
Generates three artifacts into build_root/pipelines/:
laktory_sdp.py- Python definition script with@dp.materialized_view/@dp.tabledecorators{pipeline_name}.json- serialized pipeline configuration{pipeline_name}-spec.yml- SDP YAML spec pointing to the script and config
References
| PARAMETER | DESCRIPTION |
|---|---|
catalog
|
The default target catalog for pipeline outputs.
TYPE:
|
configuration
|
Map of configuration properties
TYPE:
|
schema_
|
The default target schema for pipeline outputs. database can alternatively be used as an alias.
TYPE:
|
storage_
|
A directory to store checkpoints and configuration files. Must include a scheme (file://, s3a://, hdfs://, etc.). Defaults to file:///{self.parent_pipeline.root_path}.
TYPE:
|
type
|
Type of orchestrator
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
build |
Generate SDP artifacts into the pipeline root directory. |
execute |
Build SDP artifacts then run the pipeline via |
build()
¤
Generate SDP artifacts into the pipeline root directory.
Source code in laktory/models/pipeline/orchestrators/sparkdeclarativepipelineorchestrator.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
execute(full_refresh=False, selects=None, cwd=None, read_output=False)
¤
Build SDP artifacts then run the pipeline via spark-pipelines run.
| PARAMETER | DESCRIPTION |
|---|---|
full_refresh
|
If
TYPE:
|
selects
|
Comma-joined and passed as
TYPE:
|
cwd
|
Working directory for the subprocess. Controls where
TYPE:
|
read_output
|
If
TYPE:
|
Source code in laktory/models/pipeline/orchestrators/sparkdeclarativepipelineorchestrator.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |