Skip to end of metadata
Go to start of metadata

Introduction

Preview mode provides an interface for using sample data to test how the transformation will process the data. Preview mode is similar to mapping mode, except that it is read-only and has additional options related to testing the transformation with sample data. Also see Common Mode Elements for elements of the user interface that are shared by multiple display modes.

NOTE: 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.

Accessing Preview Mode

Preview mode is accessible only when the transformation has both a source and a target schema. If the source of the transformation is an activity (that is, if there is an activity operation step to the left of the transformation operation step), then that activity must be associated with one of these types of endpoints:

Preview mode is also accessible if the source of the transformation is not an activity, as long as the source schema has been defined within the transformation.

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

The next steps walk you through setting up a transformation to access in preview mode. The steps are different depending on whether the source data comes from a sample file, a database query activity, or a Salesforce query activity.

NOTE: The transformation and its dependent components must be valid in order to deploy and test the transformation. For more information see Transformation Mapping Validity and Component Validity.

Providing a Sample File

These steps are displayed when the source schema is provided in an adjacent file-based source activity, or when the transformation has a source schema defined within the transformation (either with or without an adjacent source activity).

CAUTION: The provided sample data file must match the structure of schema on the source side of the transformation.

Step 1 – Deploy Transformation and Related Items

This step will be present only if you have not yet deployed items that the transformation is dependent upon. For more information, see Component Deployment.

  • Deploy Transformation and Related Items: Review the items that will be deployed upon clicking Next.

    NOTE: The transformation and its dependent components must be valid in order to deploy and test the transformation. For more information see Transformation Mapping Validity and Component Validity.
  • Next: Click Next to deploy the items in the list and continue to the next step.

Step 2 – Select Sample Data

  • 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: The sample file should match the format of the source schema, with these exceptions:
    • If an XSD file format is used in the source file schema, only an XML format (not XSD) can be used for the transformation preview.
    • If the source data is compressed, a compressed file in the format specified in the source activity configuration, such as ZIP, can be used for the transformation preview.

    CAUTION: 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. The sample data used for transformation testing has a size limitation of 51200 bytes. This limit does not apply beyond 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.
  • Finished: Click Finished 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: Sample 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, please reupload the file and try again.

Querying Sample Data from a Database

These steps are displayed when the transformation uses a source with a schema defined from a database query activity.

Step 1 – Deploy Transformation and Related Items

This step will be present only if you have not yet deployed items that the transformation is dependent upon. For more information, see Component Deployment.

  • Deploy Transformation and Related Items: Review the items that will be deployed upon clicking Next.

    NOTE: The transformation and its dependent components must be valid in order to deploy and test the transformation. For more information see Transformation Mapping Validity and Component Validity.
  • Next: Click Next to deploy the items in the list and continue to the next step.

Step 2 – Define WHERE Clause

  • Define 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 use in this test: If desired, enter a WHERE clause that will be applied for purposes of transformation testing. This can be used to limit the number records retrieved for testing. If you have an original WHERE clause, then another WHERE clause provided here will be used in addition to the original clause, which will not be overwritten.

      CAUTION: 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 Finished 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.

Querying Sample Data from Salesforce

These steps are displayed when a transformation uses a source with a schema defined from a Salesforce query activity.

Step 1 – Deploy Transformation and Related Items

This step will be present only if you have not yet deployed items that the transformation is dependent upon. For more information, see Component Deployment.

  • Deploy Transformation and Related Items: Review the items that will be deployed upon clicking Next.

    NOTE: The transformation and its dependent components must be valid in order to deploy and test the transformation. For more information see Transformation Mapping Validity and Component Validity.
  • Next: Click Next to deploy the items in the list and continue to the next step.

Step 2 – Define WHERE Clause

  • Define 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: The original SOQL statement used within the source activity is listed for reference. This will include any original WHERE clause, if present.

    • WHERE clause to use in this test: If desired, enter a WHERE clause that will be applied for purposes of transformation testing. This can be used to limit the number records retrieved for testing. If you have an original WHERE clause, then another WHERE clause provided here will be used in addition to the original clause, which will not be overwritten.

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

Previewing a Transformation

The transformation screen will load 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 will automatically return you to mapping mode.

The transformation preview 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:

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

    • Change: Click Change to replace the sample file data or query data. If using a sample file, this returns you to the sample data selection step to select another file. If using a query activity, this returns you to the WHERE clause definition step to modify the WHERE clause.

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

  • Inline Data Toggle: Click the toggle icon  to toggle the inline preview of data on or off.
  • 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.
On This Page

Last updated:  Sep 18, 2019

  • No labels