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, 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 ****, 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.

NameNotes
Inloader, events
Outsaved, list, messageEvents saved, the list as RECORD:LIST, 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, stage, message, ondateAll optional.
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.