Skip to main content

base_transformation

Contains the base abstract class for all transformations.

Classes

MultiColumnOutputTransformation

class MultiColumnOutputTransformation():

Marks a Transformation class as producing multi-column output.

Ancestors

Variables

  • columns : List[str] - Returns a list of the columns that will be output.

Transformation

class Transformation(*, name: Optional[str] = None, output: bool = False):

The base class that all transformations inherit from.

By default these will be attr.dataclasses and their schemas will be generated from this. If more manual control over the schema is needed you may create a nested Schema class on the transformation that will be used instead. This nested class must inherit from TransformationSchema.

Arguments

  • name: The name of the transformation. If not provided a unique name will be generated from the class name.
  • output: Whether or not this transformation should be included in the final output. Defaults to False.

Raises

  • TransformationRegistryError: If the transformation name is already in use.
  • TransformationRegistryError: If the transformation name hasn't been provided and the transformation is not registered.

Method generated by attrs for class Transformation.

Static methods


def schema()> marshmallow.schema.Schema:

Gets an instance of the Schema associated with this Transformation.

Raises

  • TypeError: If the transformation doesn't have a TransformationSchema as the schema.

Variables

  • static name : Optional[str]
  • static output : bool