Skip to main content

The ETL actions

Installing the extension adds four private actions, category etl. Every loader's workflow uses them, and you can use them in your own workflows in the Workflow Manager, for example to check a dataset before loading or to email the team after. Each takes the loader settings as loader, the object the process passes to the workflow (see Reference).


etl_extract​

Reads the rows of a CSV, JSON, XML or Excel source, or a table of a web page (source.selector), from its URL, or runs your own extract action (source.action, with source.inputs), filling in the dates, the variables (once for each set) and the secrets.

NameNotes
InloaderThe settings; uses source.
InondateOptional, yyyy-MM-dd: the date for the placeholders. Default today.
InmaxSetsOptional: read only the first sets of variables.
Outrows, countThe rows of every set and how many.
Outurl, requestsThe first URL read, with secrets shown as **** (action <id> for your own action), and how many times the source was read.
Outstarted, messageWhen the run started, why it failed.
Exitsok, failed

etl_transform​

Turns rows into events with the loader's mapping, conditions, event id and _dsid.

NameNotes
Inloader, rows, ondateondate is optional.
Outevents, countThe events made.
Outskipped, problemCount, problemsRows left out, rows with problems, and the first 20 problems.
OutmessageWhy it failed.
Exitsok, empty, failedempty: no events and no problems.

etl_load​

Saves events to the event list target.list of the record target.object, 500 at a time. With target.mode split, it saves them to a record for each value of the field target.split.field instead: it fills the record id template from each event, makes the records that are not there (with target.split.type and the fields), and saves each record's events. target.source common saves each event with _source common (the common database); public puts a # at the start of each record id (the public database). Without it the events are private.

NameNotes
Inloader, events, history (optional)history true saves the events as a history load (the _history option of the object service): no automations, curve builds or dataset monitoring for them. The workflow passes the process input history, which Run now sets with Load as history.
Outsaved, list, records, created, missing, messageEvents saved; the list as RECORD:LIST (the record id template for a split); records the events went to; records made; events with no value of the split field (not saved); why it failed.
Exitsok, failed

etl_report​

Adds the run to the day's run report ETL_<CODE>:<date> and raises or closes the loader's alert.

NameNotes
Inloader, statusstatus: success, empty or failed.
Instarted, url, extracted, events, skipped, problemCount, problems, saved, records, created, stage, message, ondateAll optional. records and created are passed for a loader with a record for each value of a field.
OutreportThe id of the stored report.
Exitsok, failedfailed when the report could not be saved.
caution

Uninstalling the extension deletes the four actions, so every deployed loader would fail. Delete or move the loaders first.