Skip to Content

Mirrored schemas in Jitterbit Integration Studio

Introduction

If you are using a schema on the source or target side of a transformation and want to copy its structure to use on the other side of the transformation, you can mirror the schema within the transformation. Once a schema is mirrored, it becomes a custom schema that you can edit in the schema editor for a custom flat schema or custom hierarchical schema.

Mirroring a schema is possible only when the source or target that the schema is being copied to is not an adjacent connector-generated schema.

Create a mirrored schema

The option to mirror a schema is available only when certain conditions are met. This section first describes when mirroring is available, and then covers how to mirror a schema. The resulting schema generated from mirroring a schema is in the same format as the schema being mirrored. For example, if you mirror a JSON schema, you will get a JSON schema; if you mirror an XML schema, you will get a resulting XML schema, etc.

When mirroring is available

To be able to mirror a schema, first add a transformation to an operation and define either its source or target schema in any of the ways described in either Schemas defined in an activity or Schemas defined in a transformation (except for the mirror schema option).

Depending on whether the source or target schema is defined, the schema on the other side of the transformation must not be defined in order for the mirroring option to be available. If the operation has an activity on the other side of the transformation, during activity configuration when providing a request or response schema, make sure to select None in the schema dropdown selection so that the schema is not inherited by the transformation.

The source or target that the schema is being copied to cannot have an adjacent connector-generated schema; however, any source or target activity with a user-defined schema can have a schema copied to it, even if the source of the copy is from a connector-generated activity. For example, you can mirror the schema generated from a Database Query used as the source of a transformation if the target of a transformation has a user-defined schema such as that from an FTP Write activity. However, you cannot mirror a schema provided by an FTP Read activity to use as the target schema for a Database Insert activity, as you must use the schema generated by the Database endpoint. In such cases, the mirroring option is not present.

Mirror a schema

Provided the above conditions are met, the mirroring option is displayed in mapping mode on the source or target side of the transformation. Within the transformation, click the appropriate button for Mirror Target Schema or Mirror Source Schema on the respective side of the transformation:

  • Source Side: To copy a schema used on the target side of the transformation to the source side, click Mirror Target Schema on the source side:

    no source schema mirror target schema

  • Target Side: To copy a schema used on the source side of the transformation to the target side, click Mirror Source Schema on the target side:

    no target schema mirror source schema

This copies the source or target structure from one side of the transformation to the other, respectively, creating a new JSON schema called "Mirrored Schema" by default:

mirrored schema

In most cases, the resulting mirrored schema is an exact copy of the schema being mirrored, converted to JSON format. There are two exceptions provided as an aid to the user:

  • Database Activities: If the schema being mirrored is from a Database activity using a single table (without joins), then the resulting mirrored schema is automatically created with an additional child node called row. When fields within this additional node are mapped to, the node becomes a loop node to allow all records to be looped through.
  • Salesforce-based Activities: If the schema being mirrored is from a non-bulk Salesforce, Salesforce Service Cloud, or ServiceMax activity, then the resulting mirrored schema is automatically created with an additional root node called records with the child node(s) mirroring the schema. When fields within the child node(s) are mapped to, the node becomes a loop node to allow all records to be looped through.

For more information, see Loop nodes under Nodes and fields.

Once created, the mirrored schema is independent of the source schema it was mirrored from. That is, you can rename or edit this schema in any way you choose without affecting the original source schema. Because mirroring a schema copies the entire schema, in this way you can first mirror a schema and then edit it to remove fields to trim the schema (for example, to copy a database schema for only some tables being joined).

Schema actions menu

After a mirrored schema is created, you can access additional menu options that are available for all schemas.

These include deleting, renaming, viewing dependencies of, deploying, configurable deploying of, and adding to a group, as well as editing a schema or clearing a schema from a transformation. For details on these actions, see Schema actions menu.

Note

When you edit a schema that was created using this method (from mirroring a source schema), the configuration screen for a custom flat schema or custom hierarchical schema opens for you to add or edit fields and/or nodes as required.