Skip to Content

Preview Mode

Introduction

Preview mode provides a read-only interface for using sample data to test how the transformation will process the data.

Preview mode builds on the display of mapping mode, where an overview of the transformation mapping is shown. In addition to displaying the elements of the mapping mode interface, preview mode includes an inline display of data on each source and target field as well as controls to interact with the preview mode interface, as described on this page.

In preview mode, it is not possible to edit the transformation configuration, such as by adding, editing, or deleting mappings. However, the same controls for making edits that are displayed in mapping mode are also displayed in preview mode.

When you attempt to edit the transformation, you automatically exit preview mode and enter mapping mode (if using an interface element where you would remain in mapping mode) or script mode (if opening a script on a target field).

For elements of the user interface that are shared by multiple display modes, see Common Mode Elements.

Transformation Preview Processing

When configuring a transformation preview, there are two methods by which sample data can be provided:

  1. Sample data is provided by the user
    You upload the sample data to use for the transformation preview when you configure the transformation preview. This method is available in these scenarios:

    This option is described under Select Sample Data later on this page.

  2. Sample data is provided by the operation
    The sample data is fetched from the operation for certain endpoints. This method is available in these scenarios:

Preview mode displays the sample data as it will be written to the target of the transformation using any scripts specified within the transformation. In general, downstream steps in the same operation or downstream operations themselves are not executed unless they are called within a transformation script. (As noted at the end of this section, when certain activities are the transformation target, sample data is written to the target.)

For example, operations, scripts, email notifications, or plugins that are called in a transformation using functions such as RunOperation(), RunScript(), SendEmailMessage(), or RunPlugin() are executed, as they are part of the transformation. Plugins that are applied on activities are not executed during a transformation preview, as they are not part of the transformation.

The limit on the size of an individual record while previewing a transformation is 384 KB compressed, or approximately 512 KB uncompressed. There is no limit on record sizes at operation runtime.

Note

There is an important exception to this description of the execution of steps downstream of a transformation. This exception applies only if you are previewing a transformation that has a target schema defined from a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax target activity.

In this particular scenario, irrespective of where the source data originates from, sample data is written to the target, as described in NetSuite Activity and Salesforce, Salesforce Service Cloud, or ServiceMax Activity below.

Availability of Preview Mode

Preview mode is available only when the transformation has both a source and a target schema specified. The source and target schemas may be defined by an adjacent activity of any endpoint type or they may be defined in a transformation.

Access Preview Mode

When preview mode is available, a preview icon preview is displayed within the transformation toolbar.

From either mapping mode or script mode, click the preview icon:

preview button

You then provide input to configure the transformation preview, as described next.

Configure a Transformation Preview

The transformation preview configuration process walks you through setting up a transformation to preview. The specific areas shown in the preview configuration depend on these criteria:

Deploy Dependencies

The Required Components step is present only if you have not yet deployed all operations that the transformation is dependent on. If you have already deployed all operations that the transformation is dependent on, the first step is based on the other criteria listed at the beginning of this section.

When the transformation and all dependencies are valid, this step looks similar to that displayed below:

configure deploy

  • Required Components: Review the components that will be deployed on clicking Next.

  • Next: Click to deploy the components in the list and continue to the next step.

    Note

    Under certain circumstances, additional screens may be presented. Refer to Operation Deployment for a description of these screens:

    • Select Schedules and Project Variables: If there are any project variables or schedules being deployed that have already been deployed in the Harmony cloud, a screen presents you with options for selecting which values to use.
    • Add Tags and Comments: If project-level deployment settings have been configured to require a tag and/or a comment on deploying, a dialog is presented to enter the required tag and/or comment.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

If the transformation or any dependencies are invalid, they are identified in the list and the Next button is disabled:

configure deploy invalid

Cancel or close out of the preview configuration screen to correct the validity of any invalid components before attempting to preview the transformation again. For information on validity, see Transformation Mapping Validity and Component Validity.

Select Sample Data

All previewable transformations, except for those with an adjacent Database Query activity, show an area called Select Sample Data. The Select Sample Data area may be shown in a step by itself (shown in the left image below) or, if the transformation has an adjacent NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity, the option Preview Using Sample File must first be selected to show this area (shown in the right image below).

Note

If the target of the transformation is a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity, sample data is written to the target.

Select Sample Data

configure select sample data

Preview Using Sample File > Select Sample Data

configure select sample data netsuite

  • Select Sample Data: Select one of the options to provide sample data to preview in the transformation. The contents and file format of the sample file should be compatible with the source schema.

    Note

    If the file is in an invalid format, a generic error message indicates a "sampleDataLoadFailure." Potential causes of an invalid format include a CSV file missing the header, a JSON file missing a closing quote, an XML file missing a closing tag, etc.

    • Upload New File to Test: Use the Browse button to the right of the field below to browse to a file that has not yet been used for transformation testing in the current project. Though files up to 1.2 MB can be uploaded, note that the sample data used for transformation preview processing has a size limitation of 51200 bytes. These limits apply only for this preview testing.

      Tip

      To generate a valid sample file for a transformation that uses a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity:

      1. Use Create Mock Data from Source Structure to generate a sample record.
      2. Change the view of the transformation by clicking the sample file icon sample file to view the sample source data and the target file with sample data that would be generated if the transformation were to run. This view includes additional tags that are not generated by mirroring a schema.
      3. Copy and paste the content from the source or target side (as appropriate) to a new file.
      4. Make any edits to the new file as necessary, such as editing particular fields or adding or removing records.
      5. Provide the new file using Upload New File to Test.
    • Select Previously Loaded File to Test: Use the dropdown in the field below to select from an existing file that has previously been used for transformation testing in the current project.

    • Create Mock Data from Source Structure: Select to generate random data based on the structure of the source schema.

  • Finished: Click to load the sample data, retrieve the transformed data from Harmony, and continue on to the transformation preview screen, covered later on this page under Preview a Transformation.

    Caution

    Uploaded source files used for previewing a transformation are periodically removed from Harmony. In this case, you may receive an error indicating that no source file is available for testing or the source file may have expired. To resolve, reupload the file and try again.

  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Database Query Activity

The Define the WHERE Clause step is displayed when the transformation uses a source with a schema defined from a Database Query activity.

Note

If the target of the transformation is a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity, sample data is written to the target.

attachment

  • Define the WHERE Clause: The existing query is used to provide the sample data for the preview. In this step, you can further limit what sample data is loaded by providing a WHERE clause.

    • Original SQL: If created from a single-object query using the wizard or a manual query, the original SQL statement used within the source activity is listed for reference. The Original SQL will not be displayed for a multiple-object query using the wizard.

    • Original WHERE Clause: The original WHERE clause, if present, is listed for reference.

    • WHERE Clause to Be Used in This Preview (Optional): If desired, enter a WHERE clause that to be applied for purposes of previewing the transformation. This can be used to limit the number of records retrieved for preview purposes. If you have an original WHERE clause, then another WHERE clause provided here is used in addition to the original clause, which is not overwritten.

      Note

      The syntax used for the WHERE clause is case-sensitive, and must use the appropriate quote identifier of the specific database type. For examples of WHERE clauses, see Database-Specific Information.

  • Finished: Click to load the sample data, retrieve the transformed data from Harmony, and continue on to the transformation preview screen, covered later on this page under Preview a Transformation.

  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

NetSuite Activity

When a transformation has an adjacent NetSuite activity (either as a source or as a target), the step provides the options to Preview Using Source Data or Preview Using Sample File. The option Preview Using Sample File shows the area Select Sample Data, described in Select Sample Data earlier on this page.

Note

If the target of the transformation is a NetSuite activity, sample data is written to the target.

When Preview Using Source Data is selected, the text Please Click on Finish to Run the Operation and Get Preview Data is displayed:

configure source data netsuite

  • Finished: Click to fetch sample data directly from the source, retrieve the transformed data from Harmony, and continue on to the transformation preview screen, covered later on this page under Preview a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Salesforce, Salesforce Service Cloud, or ServiceMax Activity

When a transformation has an adjacent Salesforce, Salesforce Service Cloud, or ServiceMax activity (either as a source or as a target), the step provides the options to Preview Using Source Data or Preview Using Sample File. The option Preview Using Sample File shows the area Select Sample Data, described in Select Sample Data earlier on this page.

What is shown for the option Preview Using Source Data depends on whether the activity is a source or target activity for the transformation:

Source Activity

If the Salesforce, Salesforce Service Cloud, or ServiceMax activity is a Query activity and is used as the source for the transformation, the SOQL statement and original WHERE clause are displayed:

configure source data salesforce source

  • SOQL: Review the existing query statement from the activity, which is used to provide the sample data for the preview.

    • Original WHERE Clause: Review the existing WHERE clause, if present, which is used to limit the sample data to preview in the transformation.

    Note

    This step is for informational purposes only. The original SOQL and WHERE clause cannot be edited or further restricted.

  • Finished: Click to fetch sample data directly from the source, retrieve the transformed data from Harmony, and continue on to the transformation preview screen, covered below under Preview a Transformation.

  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Target Activity

If the Salesforce, Salesforce Service Cloud, or ServiceMax activity is an activity other than a Query activity and is used as the target of the transformation, the text Please Click on Finish to Run the Operation and Get Preview Data is displayed.

Note

If the target of the transformation is a Salesforce, Salesforce Service Cloud, or ServiceMax activity, sample data is written to the target.

configure source data salesforce target

  • Finished: Click to fetch sample data directly from the source, retrieve the transformed data from Harmony, and continue on to the transformation preview screen, covered below under Preview a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Preview a Transformation

The transformation screen loads in preview mode. This mode is similar to mapping mode, except that it is read-only and has additional options related to testing the transformation with sample data. If you want to edit the transformation mapping, attempting to do so automatically opens mapping mode (if using an interface element where you would remain in mapping mode) or script mode (if opening a script on a target field).

Preview mode displays data from the provided sample file or query inline next to each source field and each mapped target field:

overview

In preview mode, the transformation toolbar provides a set of tools for interacting with the preview mode interface:

preview button expanded

  • Sample Data: The name of the currently loaded sample file or query activity is displayed. Click the sample file or query activity to show options to clear or change the sample data, described under Clear or Change Sample Data below.

    preview button sample data

  • Record Cycle: Click the left and right arrows to cycle through records within the sample data file or query data, updating the preview data readout:

    preview button record cycle

    The first number indicates which record data is currently displayed in the transformation preview, out of the total number of records available in the sample file or query.

    Note

    Within the preview data, additional arrows are available on nodes that have multiple sub-records within a record to cycle through:

    record cycle

  • Undo: Click the undo icon undo to reverse your last action (see Undo and Redo in Cloud Studio Permissions, Collaboration, and Saving).

  • Redo: Click the redo icon redo to reverse your last Undo action (see Undo and Redo in Cloud Studio Permissions, Collaboration, and Saving).

  • Inline Data: Click the inline data icon inline data to view the inline preview of data. This is the default view.

  • Sample Files: Click the sample files icon sample file to view the sample source data and the target file with sample data that would be generated if the transformation were to run:

    sample files

  • Close: Click the close icon close 18 to exit out of preview mode and return to the transformation configuration screen.

Clear or Change Sample Data

Click the name of the sample file or query activity to show options to clear or change the sample data:

preview button sample data

  • Clear: Click to remove the sample file data or query data and return to the transformation configuration screen.

  • Change: Click to replace the sample file data or query data. The behavior depends on how the sample data has been defined: