Skip to end of metadata
Go to start of metadata

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 Any Source Activity or Transformation-Owned Source Schema later on this page.

  2. Sample data is provided by an adjacent activity
    The sample data is fetched from an adjacent server-based source activity 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. (When certain activities are the transformation target, as noted below, sample data is fetched and 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, data is always fetched from the source directly, irrespective if the scenario meets the conditions specified for either of the two methods described above. See NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax Target Activity later on this page.

Availability of Preview Mode

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

Accessing Preview Mode

When preview mode is available, a Preview button is displayed in the top right of the transformation configuration screen. When preview mode is not available, the button is not displayed.

From either mapping mode or script mode, click the Preview button in the top right:

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

Configuring a Transformation Preview

The transformation preview configuration process walks you through setting up a transformation to access in preview mode. The steps differ depending on three criteria:

  1. Whether you have deployed all components that the transformation is dependent on. If you have not yet deployed all dependencies, the first step of configuring a transformation preview is always Required Components, described below in Deploying Dependencies.
  2. Whether the target of the transformation is a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity. Regardless of where the source data originates, if the target of the transformation is one of these activity types, the next step is always Please Click on Finish to Run the Operation and Get Preview Data, described below in NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax Target Activity.
  3. Where the source data originates. These possible sources of data can be provided for a transformation preview:

Deploying Dependencies

The Required Components step is present only if you have not yet deployed all components that the transformation is dependent onIf you have already deployed all components 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 dependent components are valid, this step looks similar to that displayed below:

  • 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.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

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

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.

NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax Target Activity

The Please Click on Finish to Run the Operation and Get Preview Data step is always displayed when a transformation uses a target with a schema defined from a NetSuite, Salesforce, or ServiceMax target activity. In these scenarios, data is fetched directly from the source and then written to the target activity.

WARNING: When a NetSuite, Salesforce, or ServiceMax activity is used as the target of a transformation, previewing the transformation will write data to the 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 Previewing a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Any Source Activity or Transformation-Owned Source Schema

The Select Sample Data step is displayed when the transformation has any adjacent source activity (with the exceptions of a Database, NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax activity), or when the transformation has a source schema defined within the transformation (either with or without an adjacent source activity).

NOTE: An exception is with a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax target activity, in which cases data is fetched from the source directly (see NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax Target Activity above).

  • 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 file 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. This limit applies only for this preview testing.
    • 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: 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 Previewing 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: An exception is with a NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax target activity, in which cases data is fetched from the source directly (see NetSuite, Salesforce, Salesforce Service Cloud, or ServiceMax Target Activity above).

  • Define the WHERE Clause: The existing query is used to provide the sample data to preview in the transformation. 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 Previewing a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

NetSuite Search Activity

The Please Click on Finish to Run the Operation and Get Preview Data step is displayed when the transformation uses a source with a schema defined from a NetSuite Search activity:

  • 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 Previewing a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Salesforce, Salesforce Service Cloud, or ServiceMax Query Activity

The SOQL step is displayed when a transformation uses a source with a schema defined from a Salesforce Query, Salesforce Service Cloud Query, or ServiceMax Query activity:

  • SOQL: Review the existing query statement from the activity, which is used to provide the sample data to preview in the transformation.
    • 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 Previewing a Transformation.
  • Cancel: Click to close the preview configuration screen and return to the transformation without previewing data.

Previewing 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:

When you enter preview mode, the Preview button is expanded to show the options for interacting with the preview mode interface:

  • 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 Clearing or Changing Sample Data below.

  • 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:

    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:

  • View Inline Data: Click the inline data icon  to view the inline preview of data. This is the default view.
  • View Sample Files: Click the sample file icon to view the sample source data and the target file with sample data that would be generated if the transformation were to run:

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

Clearing or Changing Sample Data

Click the name of the sample file or query activity to show options to clear or change the 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:

  • No labels