Spread Properties#

class sycamore.transforms.spread_properties.SpreadProperties(child: Node, props: list[str], **resource_args)[source]#

Bases: SingleThreadUser, NonGPUUser, Map

The SpreadProperties transform copies properties from each document to its subordinate elements.

Parameters:
  • child -- The source node or component that provides the hierarchical documents to be exploded.

  • resource_args -- Additional resource-related arguments that can be passed to the explosion operation.

Example

source_node = ...  # Define a source node or component that provides hierarchical documents.
spread_transform = SpreadProperties(child=source_node, list=["title"])
spread_dataset = spread_transform.execute()