Code Patterns

Code Pattern is a special type of the Component.

List of the Code Patterns

In the Keboola Developer Portal can be found published components with the Code Pattern type. In the description you can find out for which transformation types can be component used.

Screenshot -- Transformations page

New Transformation with Code Pattern

This section describes how to create a new transformation with the code pattern.

First, click Transformations on the project menu.

Then click New Transformation to create a new transformation.

Screenshot -- Transformations page

In the modal click on the selected type of the transformation.

Screenshot -- Add new transformation modal

Fill in the name and optionally the description.

Then select the code pattern from the Use predefined code pattern select box.

If the code pattern is missing in the list, please check whether it supports selected transformation type and is published.

Click the Create Transformation button.

Screenshot -- Select box for code pattern

New transformation has been created and you can see its configuration.

You can now fill in the Parameters Form and click on the Generate Code button.

Follow the instructions at the top of the configuration page.


Screenshot -- Code pattern user interface

The user interface of the configuration consists of:

  1. Instructions, how to set up the code pattern correctly.
  2. Table Input Mapping
  3. Table Output Mapping
  4. Parameters Form of the code pattern.
  5. Generate Code button.
  6. Read-only generated code.

Input and Output Mapping

Table Input and Output mapping can be created:

  • manually as in ordinary transformations.
  • automatically generated together with the code, if the component supports it.

Follow the instructions at the top of the configuration page.

Below you can see an example mapping. It was generated by the Snapshot - SCD code pattern.

Screenshot -- Input / Output mapping

Parameters Form

The parameters determine the content of the generated code. The form is generated dynamically based on the component specification in the Keboola Developer Portal. Remember to save your changes.

Screenshot -- Parameters

Generated Code

Generated code is read only, cannot be adjusted manually. It is (re)generated by clicking on the button. After clicking, the Generate Action is called on the code pattern component with the actual parameters. The result is then saved and displayed.

Screenshot -- Generated Code

After the code has been generated, you can run the job in the standard way.