Skip to main content

Reusable Record Transforms

When the same set of transform funcitons needs to be repeatedly applied to multiple Nexsets and/or data flows, creating a reusable record transform can save time and ensure consistency. Instead of requiring users to set up identical transforms for each Nexset in this scenario, a reusable record transform can be applied to define the entire output Nexset record.

1. What are Reusable Record Transforms?

Reusable record transforms consist of custom code that defines the entire structure of the output recordi.e., the entire output Nexsetand can be created using Python, JavaScript, or JSON code in Nexla. These transforms receive an entire Nexset record as input, along with any metadata information about the Nexset as metadata.

For data flows that require the repeated application of a common set of transformation functions, reusable record transforms can provide significant time-savings. Reusable record transforms can be easily created, applied, edited, and shared with others in the user's organization.

Reusable Record Transforms vs. Reusable Attribute Transforms

Reusable record transforms define the entire output Nexset record.

To learn how to create custom reusable transforms that are applied to individual attributes and define a single attribute in the output Nexset, see Reusable Attribute Transforms.

Once created, reusable record transforms can be accessed within the the Nexset Designer and can be applied to any Nexset, avoiding the need to apply the same transform functions individually for each data flow.

Reusable record transforms can also be shared with others in a user's organization.

2. Create a Reusable Record Transform

This section provides instructions for creating a new reusable record transform in Nexla.

2.1 Create a New Reusable Record Transform

  1. Navigate to the ReusableTransforms.png screen in the Integrate.png section.

      ReusableTransforms2.png

  2. Select the RecordTx.png tab.

      RecordTx2.png

  3. Click NewRecordTx.png to open the Create Record Transform screen.

      CreateRecordTx.png

2.2 Record Transform Name & Description

  1. In the Create Record Transform screen, enter a name for the custom record transform in the text field at the top of the center panel.

      RecTxName.png

  2. Enter a brief description of the custom record transform in the Description text field below the transform name.

    Text entered in this field will appear as the record transform summary in the pulldown menu in the Nexset Designer.

      RecTxDesc.png

  3. Optional: Click Documentation.png in the top right corner of the center panel to open the Documentation drawer, and enter an expanded description and/or additional information about the transform in the text field.

    Documentation helps users understand what a custom record transform does, its intented purpose, etc. This is particularly useful when an organization includes many resources and many users, as well as when triaging data flows.

      Documentation2.png

    • Click SaveDocumentation.png to save the entered information and close the Documentation drawer.

2.3 Define the Transform Function

  1. Select the language that will be used for the record transform by clicking the Python, JavaScript, or Nexla JSON button at the top of the Function Code box.

      Language.png

  2. Enter the record transform code in the Function Code text box using the language format selected in Step 1.

    Record Transform Formatting

    Transform Code Format:
    The record transform function signature follows the format of transform(input, metadata, args). Record transform functions receive the entire Nexset record as input and any metadata information about the record as metadata.

    Reference Existing Transforms

    When creating a custom record transform, any existing custom record transform accessible to the account can be referenced using the Record Transforms panel on the left side of the screen.

      ReferenceTx1.png

    Click on a transform listed in this panel to open the transform information drawer. This drawer displays information about the transform in addition to the transform code. Any portion of the code can be copied for use in the new record transform.

      ReferenceTx2.png

2.4 Test the Transform Function

Once the custom record transform code has been entered, the function can be tested using sample data. This sample data can be entered manually or pulled from an existing Nexset.

  1. Enter or select sample data with which the custom record transform will be tested. The steps below provide instructions for loading sample data from an existing Nexset or entering the sample data manually.

    • Load Sample Data from a Nexset:
    1. In the Test Sample Input box at the bottom of the center panel, click the LoadSample.png button.

        LoadSample2.png

    2. Use the Load Sample Data from a Nexset window to select a Nexset from the list. A sample record will be loaded from the selected Nexset to test the custom transform function.

        LoadSample2.png

      • To filter listed Nexsets by name, enter the full or partial Nexset name in the text field at the top of the window.

          LoadDataWindow2.png

      • Select a Nexset by clicking the option button to the left of it.

          SelectNexset.png

    3. Click the LoadSamplesButton.png button in the bottom right corner of the window to load a sample record from the selected Nexset into the Test Sample Input box.

        Samples2.png


    • Enter Sample Data Manually:
    1. To enter sample data manually, type the sample data into the Test Sample Input text field at the bottom of the center panel.

      Sample data must be entered in JSON format.

        ManualSamples.png


  2. Click the TestTransform.png button at the top of the Function Code boxwhere the custom transform code was entered in Section 2.3 to apply the transform to the sample data.

      TestTransform2.png

  3. The output data resulting from applying the custom transform to the sample data will be shown in the Generated Output panel on the right side of the screen.

      GenOutput.png

2.5 Save the Reusable Record Transform

  1. Once the custom record transform has been entered and tested to confirm that it produces the expected output, click Create.png in the top right corner of the screen to save and create the transform.

    info

    The reusable record transform will now be accessible to the owner in the Nexset Designer. To learn how to share reusable record transforms with other users, see Section 4.

3. Use a Reusable Record Transform

  1. In the Nexset Designer, click Add_Rule_Group.png in the Nexset Rules panel, and select Transform_Code.png from the menu that appears.

      Rule_Menu.png

  2. Use the pulldown menu in the new rule group to select the desired reusable record transform.

    info

    Reusable record transforms to which users have access will be listed under the "Your Reusable Transforms" category (below the code-selection options) in the menu.

      Select_Transform.png

  3. Once a reusable record transform is selected, its name will be displayed at the top of the rule group, and its code will be shown below the pulldown menu.

      Code_Display.png

  4. Click Run_Nexset_Rules.png to generate output samples in the Nexset Output panel.

  5. Click Save.png in the top right corner of the screen at any point to save the current transform progress. Once the transform is complete, click Save_Close.png to save the transform and close the Nexset Designer.

4. Share a Reusable Record Transform

  1. To share a reusable record transform, navigate to the ReusableTransforms.png screen in the Integrate.png section, and select the RecordTx.png tab.

      RecordTx3.png

    Record Transforms Tab

    In the Record Transforms tab, all reusable record transforms accessible to the user can be viewed.
    By default, custom record transforms owned by the user are shown. To view shared transforms, change the value of the access keyword to collaborator in the search bar at the top of the screen.
     RecordTx4.png

  2. Click on the transform to be shared to open its information drawer, and select the Access tab.

      AccessTab.png

  3. Use the pulldown menu on the left to select the user, group, or email address with whom the transform will be shared.

      SelectUser.png

  4. Choose the level of access that will be granted to the selected user(s) from the pulldown menu on the right.

      SelectAccess.png

  5. Click the GrantAccess.png button to share the reusable record transform with the user(s) at the selected access level.

    • The shared reusable record transform will now be accessible to the selected user(s) in the Nexset Designer.

5. Edit a Reusable Record Transform

Updating Record Transforms

When a reusable record transform is applied to a Nexset, that Nexset references the applied transform resource. Because the Nexset references the record transform resource, any changes to a reusable record transform are automatically applied to any Nexsets currently referring to that transform.

Therefore, use caution when editing a custom reusable record transform, as edits will affect existing Nexsets/data flows using the transform.

  1. To edit a reusable record transform, navigate to the ReusableTransforms.png screen in the Integrate.png section, and select the RecordTx.png tab.

      RecordTx3.png

    Access Levels

    Users can only edit owned reusable record transforms and those to which they have been granted Administrator access.

  2. Click Edit.png on the transform to be edited, and select Edit_Menu.png from the dropdown menu.

      EditTx.png

  3. In the Edit Record Transform screen, users can make any necessary edits to the transform code, name, and description.

      EditTx2.png

    Testing Edited Transforms

    When editing the code of a custom reusable record transform, before saving the edits, follow the instructions in Section 2.4 to test the edited transform code and ensure that the expected output data is generated.

  4. Once all edits are complete, click Save.png in the top right corner of the screen to save the changes to the reusable record transform.