Custom
For analysts proficient in Pig scripting, the Custom package provides a tool to write and execute scripts in prepare, an ideal environment for Pig data transformations. While Pig scripting is outside the scope of this instruction, the following is an example of a script used in a custom transformation to create a subset of two fields from an entity with ten fields.
Double-click or drag the Custom icon onto the canvas to activate the live control.
When the square icon becomes a live controller on the canvas, double-click to reveal INPUT, SCRIPT, and OUTPUT criteria for the operation.
INPUT: Connect the source entity (output port) to the Custom control (input port), the input fields populate within the package.
SCRIPT: Users generate Pig script in the SCRIPT window. The example below creates a custom subset extracting 3 Fields from the source entity.
OUTPUT: Users format the target entity by entering Field Names and defining each field's Data Type. In the example below, the script has structured the target entity to have three fields. Users name each field and select the appropriate data type.
The script used for this example defines the following three fields to display for each record:
FIRST_NAME
LAST_NAME
SALARY
Save the dataflow, Validate the package, then Execute the data load into the target entity. For this example, the target entity 'EMPLOYEES_CUSTOM' shows output of the Custom operation.