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
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
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
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |