Important Nexla Help Center Update:
Nexla's Zendesk Help Center pages are being deprecated and will soon no longer be available.
Nexla Documentation is now the home for Nexla's User Guides, with improved formatting and categories that are easier to navigate, providing a better overall user experience.
Please update any bookmarks to the new Nexla Documentation site (docs.nexla.com/user-guides).
_______________________________________________
This article provides information about how to create and use reusable record transforms in Nexla.
Some data flows require repeated and/or regular applications of the same data transformation functions. With Nexla, instead of having to set up identical transforms for each Nexset in this scenario, users can create reusable record transforms.
Contents:
1. What are Reusable Record Transforms?
2. Create a Reusable Record Transform
2.1 Define the Transform Function
2.2 Test the Record Transform
2.3 Save the Reusable Record Transform
3. Use a Reusable Record Transform
4. Share a Reusable Record Transform
5. Edit a Reusable Record Transform
1. What are Reusable Record Transforms?
Reusable record transforms consist of custom code that defines the entire output record—i.e., output Nexset—and can be created using Python, JavaScript, or JSON code in Nexla. For data flows that require the repeated application of a common set of transformation functions, reusable record transforms can provide significant time-savings and can be easily created, applied, and edited, and shared with others in the user's organization.
Reusable record transforms define the entire output Nexset, unlike reusable attribute transforms, which provide reusable custom transform functions for individual attributes in a Nexset. For information about reusable attribute transforms as well as how to create, use, and share them, see our Reusable Attribute Transforms article.
2. Create a Reusable Record Transform
- Hover over
on the toolbar on the left side of the screen, and select
from the menu that appears. This opens the Reusable Transforms library.
- Click
in the top right corner of the screen to access the reusable transform creation screen.
2.1 Define the Transform Function
- Select "Record Transform" from the Transform Type pulldown menu.
- Enter a name for the custom record transform in the Name field.
- Enter a description of the custom record transform in the Description field.
Text entered in this field will appear as the transform function summary in the Function pulldown menu in the Nexset Designer.
- Under the
tab, select the desired language to be used for coding the transform—Python, JavaScript, or JSON—from the Code Language pulldown menu.
- In the text field at the bottom of the tab, enter the desired transform code using the language selected in Step 4.
The record transform function signature follows the format of transform(input, metadata, args). A record transform receives the entire input record as input and any metadata information about the record as metadata.
2.2 Test the Record Transform
- Once the record transform code has been entered, select the
tab to test the transform.
- Sample records for transform testing can be entered in two ways:
To test using an existing Nexset as the sample record, select the desired Nexset from the "Use Sample from Nexset" pulldown menu.
To manually enter sample records for testing, enter the desired samples in JSON format in the text field under "Or Enter Array of Input Samples". - Click
to the right of the Test Data tab to generate a test preview of the function output in the Generated Output panel.
2.3 Save the Reusable Record Transform
- Once the record transform is complete and generates the desired result, click
in the top right corner of the screen to save the custom reusable record transform.
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 #.
3. Use a Reusable Record Transform
- In the Nexset Designer, click
in the Nexset Rules panel, and select
from the menu that appears.
- Use the pulldown menu in the new rule group to select the desired reusable record transform.
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.
- 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.
- Click
to generate output samples in the Nexset Output panel.
- Click
in the top right corner of the screen at any point to save the current transform progress. Once the transform is complete, click
to save the transform and close the Nexset Designer.
4. Share a Reusable Record Transform
- Access the Reusable Transforms library as indicated in Section 2, Step 1.
- Optional: To choose whether to view only owned (created) reusable transforms or all accessible reusable transforms, use the menu on the right at the top of the list.
- Click on the reusable transform to be shared. This will open a side window containing information about the transform.
- Select the
tab to view the Access Management screen.
- Use the pulldown menu on the left to select the user with whom the reusable transform should be shared.
To share the transform with all users in the organization, select the
option.
- Choose whether to grant the user(s) with whom the transform will be shared Collaborator or Administrator access, select the appropriate access type from the pulldown menu on the right.
A user designated as a Collaborator will be granted read-only access to the transform. Collaborators can view and use shared transforms but cannot edit or share them.
A user designated as an Administrator will be granted full access to the transform. Administrators can view, use, edit, and share transforms.
- Click
to share the transform with the selected user(s).
The shared reusable record transform will now be accessible to the selected user(s) for selection in a Transform: Code rule group in the Nexset Designer.
5. Edit a Reusable Record Transform
Important: Reusable record transforms are only referenced when applied to any Nexset; therefore, any changes to a reusable record transform are automatically applied to any Nexsets referring to that transform.
- To edit an existing reusable record transform, access the Reusable Transforms library as indicated in Section 2, Step 1.
Users can only edit owned reusable record transforms and those to which they have been granted Administrator access.
- Click
on the transform to be edited, and select
from the menu that appears.
- In the Edit Reusable Transform screen, users can make any necessary edits to the transform name, description, and/or definition.
- Once all necessary edits are complete, click
in the top right corner of the screen to save the changes to the reusable record transform.
Comments
0 comments
Please sign in to leave a comment.