• v7.0.8
    • v7.11.0 (latest)
    • v7.10.0
    • v7.9.0
    • v7.8.0
    • v7.7.0
    • v7.6.0
    • v7.5.0
    • v7.3.0
    • v7.2.0
    • v7.1.1
    • v7.1.0
    • v7.0.8
  • Services & Support
  • Devo.com
  • Contact
    • Contact Us
    • Request a Demo
    • Partner Inquiry
  • Log In
    • USA Devo
    • EU Devo
PREVIOUS
Event
NEXT
Generator

Flow / Unit types / Event / Detacher

Download as PDF

Detacher

Description

This unit is a Processor unit type.

A unit that transforms an event containing a list into a sequence of events containing successive list items. This can be done simultaneously over several lists (producing a zip, not a cartesian product).

You specify fields in the input event containing lists to be detached and transformed into individual values in the output events.

An event comes in through the in port. The init port emits a signal stream to indicate the start of a list.

The unit processes and transforms the lists into individual values. The end port emits a signal stream to indicate the end of a list.

If some of the specified fields are not present or don't have the correct type, the event is sent to the malformed output port.

Successful N output events are sent to the out port, N being the max length of lists. Each of these events will contain "a slice" of original lists at a growing index. For lists shorter than the longest one, corresponding values will be null.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

TabFieldDescription
GeneralNameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
FieldsClick the plus icon to add fields containing lists.
NameEnter the name of the field in the input event containing a list.
ArrayWhether collection type is Array (true) or Collection (false).
Component typeClass of collection/array items. Enter a java class qualified name.

Input ports

PortDescription
inAll events enter through this port. They must contain fields specified in settings, and comply with the specified type.

Output ports

PortDescription
initSignal stream that indicates the start of a list.
outOutputs the events containing the same fields as input events, but with single values instead of lists.
endSignal stream that indicates the end of a list.
malformedOutputs input events that don't have the specified fields or type.

Example

Imagine you wish to view a list as a sequence of events.

You can use the Detacher unit to transform events containing a list into a sequence of events containing successive list items. To do it, we add a Tick unit to fire the request every time we need it. Then, connect it to the Detacher unit through its in input port. Finally, we can send the events to Devo by connecting the Detacher out output port to a Devo Sink unit.

In the Tick unit properties, set the fields to transform in the Fields tab.

In the Detacher unit properties, you must specify whether to detach lists, arrays, or sets. Here we will choose Array.

In the Devo Sink unit properties, send the events to a my.app table and choose the Array field.

You can try this flow by downloading this JSON file and uploading it to your domain using the Import option.

Download as PDF

PREVIOUS
Event
NEXT
Generator

Export

See what Devo can do for you. Request a demo!
Discover what's new (Release notes)
  • v7.0.8
    • v7.11.0 (latest)
    • v7.10.0
    • v7.9.0
    • v7.8.0
    • v7.7.0
    • v7.6.0
    • v7.5.0
    • v7.3.0
    • v7.2.0
    • v7.1.1
    • v7.1.0
    • v7.0.8
  • Services & Support
  • Devo.com
  • Contact
    • Contact Us
    • Request a Demo
    • Partner Inquiry
  • Log In
    • USA Devo
    • EU Devo
  • +1 888 6830910 (USA)
  • +34 900 838 880 (Spain)
Copyright © 2019 Legal Terms Privacy Policy Cookies Policy

Powered by Confluence and Scroll Viewport