View Jitterbit Developer Portal
Introduction
Schemas are used to represent the request and response structures in a transformation. Those schemas can be inherited from activities that are initially adjacent to the transformation, or they can be defined directly in a transformation. This page describes when schemas are used and how schemas are defined.
When a Schema Is Used
Whether a schema is used depends on the activity and if it is being used as a source or a target of a transformation.
Sources
A source activity is any activity that provides data within an operation, which can then be transferred to a target unchanged or changed by a transformation prior to reaching a target. Source activities require a data schema only if they will be used as input in a transformation: Activities that are typically (but not necessarily) used as sources include those with one of these words in the name of the activity:
Targets
A target activity is any activity that receives data within an operation. This data can come from a source activity, from a transformation, or from other input such as variables or scripts. Target activities require a data schema only if they are receiving data that has been transformed or if they provide a response that you want to write to another target: Activities that are typically (but not necessarily) used as targets include those with one of these words in the name of the activity:
How Schemas Are Defined
Schemas are defined either in an activity or in a transformation. In an operation, a schema provided in an adjacent activity (or an initially adjacent activity that has since been removed) takes precedence over a schema defined in a transformation.
This diagram shows an operation whose transformation inherits its source schema from a preceding adjacent activity and has a transformation-defined target schema:
Schemas defined in an activity may be generated from a server-based connector or user-defined in a file-based connector:
- Server-based: Server-based connectors automatically generate schemas from the endpoint during configuration of an activity. Depending on the specific activity, either a request or a response schema, or both a request and a response schema may be generated.
- File-based: File-based connectors allow you the option to define a schema in the activity configuration. Depending on the specific activity, either a request or a response schema, both a request and response schema, or no schemas may be defined.
When used in an operation, activities that have a request schema don't necessarily need to be preceded by a transformation. Similarly, activities that have a response schema don't necessarily need to be followed by a transformation. In some cases, such as an operation designed to archive files from a data source to a target without a transformation, no schemas are required; if they are specified, they are simply ignored.
In an operation, if a transformation requires a source schema, it must be preceded by an activity providing a response schema. Other rules and patterns for constructing a valid operation are covered in Operation Validity.
Activity-provided response and request schemas always override transformation-provided source and target schemas, if present:
- Activity-provided response schema: When a connector activity with a response schema is placed preceding a transformation, the activity response schema is inherited by the transformation as the source schema and overrides any transformation-provided schema.
- Activity-provided request schema: When a connector activity with a request schema is placed following a transformation, the activity request schema is inherited by the preceding transformation as the target schema and overrides any transformation-provided schema.
All transformations are reusable regardless of where their schemas come from. However, there are special considerations when referencing in another operation a transformation that has a schema provided by an activity, as described in Transformation Reuse.
If a transformation-provided schema was present prior to configuration of an adjacent activity, that schema cannot be cleared directly. Though a transformation-provided schema remains referenced by the transformation, it is not used in processing. To clear a transformation-provided schema under these circumstances, you can temporarily remove the adjacent activity first. Once the adjacent activity is removed, a transformation-provided schema can be cleared by using the schema actions menu to select Clear Schema. Once you have cleared the transformation-provided schema, you can replace the activity in the operation.