streamsx.spl.op module

class streamsx.spl.op.Expression(_type, _value)

Bases: object

static expression(value)
spl_json()
class streamsx.spl.op.Invoke(topology, kind, inputs=None, schemas=None, params=None, name=None)

Bases: streamsx.topology.exop.ExtensionOperator

Declaration of an invocation of an SPL operator in a Topology.

An SPL operator has an arbitrary of input ports and an arbitrary number of output ports. The kind of the operator places constraints on how many input and output ports it supports, and potentially the schemas for those ports. For example spl.relational::Filter has a single input port and one or two output ports, in addition the schemas of the ports must be identical.

When the operator has output ports an instance of SPLOperator has an outputs attributes which is a list of Stream instances.

Parameters:
  • topology (Topology) – Topology that will invoke the operator.
  • kind (str) – SPL operator kind, e.g. spl.utility::Beacon.
  • inputs

    Streams to connect to the operator. If not set or set to None or an empty collection then the operator has no

    input ports. Otherwise a list or tuple of Stream instances where the number of items is the number of input ports.
  • schemas

    Schemas of the output ports. If not set or set to None or an empty collection then the operator has no

    outut ports. Otherwise a list or tuple of schemas where the number of items is the number of output ports.
  • params – Operator parameters.
attribute(input, name)
expression(value)
output(stream, value)
class streamsx.spl.op.Map(kind, stream, schema=None, params=None, name=None)

Bases: streamsx.spl.op.Invoke

Declaration of an invocation of an SPL map operator.

Map operators have a single input port and single output port.

An instance of Map has an attribute stream that is Stream produced by the operator.

This is a utility class that allows simple invocation of the common case of a operator with a single input stream and single output stream.

Parameters:
  • kind (str) – SPL operator kind, e.g. spl.utility::Beacon.
  • stream – Stream to connect to the operator.
  • schema – Schema of the output stream.
  • params – Operator parameters.
attribute(name)
output(value)
stream
class streamsx.spl.op.Sink(kind, stream, params=None, name=None)

Bases: streamsx.spl.op.Invoke

Declaration of an invocation of an SPL sink operator.

Source operators typically send data on a stream to an external system. A sink operator has a single input port and no output ports.

This is a utility class that allows simple invocation of the common case of a operator with a single input port.

Parameters:
  • kind (str) – SPL operator kind, e.g. spl.utility::Beacon.
  • input – Stream to connect to the operator.
  • params – Operator parameters.
class streamsx.spl.op.Source(topology, kind, schema, params=None, name=None)

Bases: streamsx.spl.op.Invoke

Declaration of an invocation of an SPL source operator.

Source operators typically bring external data into a Streams application as a stream. A source operator has no input ports and a single output port.

An instance of Source has an attribute stream that is Stream produced by the operator.

This is a utility class that allows simple invocation of the common case of a operator with a single output port.

Parameters:
  • topology (Topology) – Topology that will invoke the operator.
  • kind (str) – SPL operator kind, e.g. spl.utility::Beacon.
  • schema – Schema of the output port.
  • params – Operator parameters.
output(value)
stream