# pysparky_pipeline

*module*

Declarative pipelines built from native PySpark expressions.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/__init__.py#L1-L1)

## pysparky_pipeline.CircularDependencyError

*class*

```python
class CircularDependencyError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when registered nodes contain a dependency cycle.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L16-L17)

## pysparky_pipeline.ColumnConflictError

*class*

```python
class ColumnConflictError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a source, dependency, or output column name is ambiguous.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L44-L45)

## pysparky_pipeline.ColumnPipeline

*class*

```python
class ColumnPipeline(_PipelineInspection)
```

Bases: `pysparky_pipeline.inspection._PipelineInspection`

Re-exported from: `pysparky_pipeline.column`

Build lazy DataFrame projections from functions returning Columns.

Function names define output columns, and parameter names define source or
derived-column dependencies. The pipeline stores graph metadata only; a
Spark transformation is constructed when `transform` is called.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/column.py#L40-L200)

### pysparky_pipeline.ColumnPipeline.graph

*property*

```python
graph: DependencyGraph
```

Return the immutable dependency graph used by this pipeline.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/column.py#L61-L63)

### pysparky_pipeline.ColumnPipeline.transform

*method*

```python
def transform(dataframe: DataFrame, outputs: Iterable[str] | None = None) -> DataFrame
```

Return a lazy DataFrame with the selected derived columns appended.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/column.py#L65-L119)

### pysparky_pipeline.ColumnPipeline.describe

*method*

```python
def describe() -> str
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Return a concise, deterministic summary without printing it.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L45-L60)

### pysparky_pipeline.ColumnPipeline.execution_order

*method*

```python
def execution_order(outputs: Iterable[str] | None = None) -> tuple[str, ...]
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Return the deterministic order for the selected dependency closure.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L79-L81)

### pysparky_pipeline.ColumnPipeline.lineage

*method*

```python
def lineage(name: str) -> dict[str, object]
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Describe declared upstream nodes and inputs for one output node.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L66-L77)

### pysparky_pipeline.ColumnPipeline.required_inputs

*method*

```python
def required_inputs(outputs: Iterable[str] | None = None) -> tuple[str, ...]
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Return required external inputs for all or selected output nodes.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L62-L64)

### pysparky_pipeline.ColumnPipeline.to_dict

*method*

```python
def to_dict() -> dict[str, object]
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Return the versioned, language-independent graph representation.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L83-L110)

### pysparky_pipeline.ColumnPipeline.to_json

*method*

```python
def to_json() -> str
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Serialize `to_dict` using stable standard-library JSON.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L112-L114)

### pysparky_pipeline.ColumnPipeline.to_mermaid

*method*

```python
def to_mermaid() -> str
```

Inherited from: `pysparky_pipeline.inspection._PipelineInspection`

Return deterministic Mermaid flowchart source for declared edges.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/inspection.py#L116-L134)

## pysparky_pipeline.DuplicateNodeError

*class*

```python
class DuplicateNodeError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when registered functions have the same node name.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L8-L9)

## pysparky_pipeline.DuplicateOutputError

*class*

```python
class DuplicateOutputError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when an output is requested more than once.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L28-L29)

## pysparky_pipeline.InvalidExecutionInputError

*class*

```python
class InvalidExecutionInputError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when execution inputs are invalid or shadow graph node names.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L36-L37)

## pysparky_pipeline.InvalidNodeOutputError

*class*

```python
class InvalidNodeOutputError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a node returns an object of the wrong type.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L40-L41)

## pysparky_pipeline.InvalidSignatureError

*class*

```python
class InvalidSignatureError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a registered function has an unsupported signature.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L12-L13)

## pysparky_pipeline.MissingDependencyError

*class*

```python
class MissingDependencyError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a required external input value or column is missing.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L32-L33)

## pysparky_pipeline.NodeExecutionError

*class*

```python
class NodeExecutionError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a node function fails during pipeline execution.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L48-L49)

## pysparky_pipeline.PipelineError

*class*

```python
class PipelineError(Exception)
```

Bases: `Exception`

Re-exported from: `pysparky_pipeline.errors`

Base class for errors raised by PySparky Pipeline.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L4-L5)

## pysparky_pipeline.UnknownNodeError

*class*

```python
class UnknownNodeError(PipelineError)
```

Bases: `pysparky_pipeline.errors.PipelineError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a graph operation names a node that is not registered.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L20-L21)

## pysparky_pipeline.UnknownOutputError

*class*

```python
class UnknownOutputError(UnknownNodeError)
```

Bases: `pysparky_pipeline.errors.UnknownNodeError`

Re-exported from: `pysparky_pipeline.errors`

Raised when a requested graph output is not registered.

[View source](https://github.com/PySparky/pysparky-pipeline/blob/4a64f789246a4be5067124ee05e3c2d06ae49631/src/pysparky_pipeline/errors.py#L24-L25)

**Modules**

- `pysparky_pipeline.column`
- `pysparky_pipeline.dataframe`
- `pysparky_pipeline.errors`
- `pysparky_pipeline.graph`
- `pysparky_pipeline.inspection`
- `pysparky_pipeline.node`
