Skip to end of metadata
Go to start of metadata

Introduction

File schemas are used to represent the "request" and "response" structures in a transformation. Those file schemas can be inherited from activities that are adjacent to the transformation, or they can be defined directly in the transformation. 

When to Use a Schema

Whether a file schema is required depends on the type of 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:

  • If the source activity is providing data that will be transformed, it must have a "response" data schema, which is either automatically provided or can be defined while configuring the activity or transformation.
  • If the source activity is providing data that will not be transformed, a "response" file schema does not need to be defined, as it is not used in the operation.

Activities that are typically (but not necessarily) used as sources include those with one of these words in the name of the activity:

  • Download
  • Get
  • Read
  • Request
  • Query

Targets

A target activity is any activity that receives data within the 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:

  • If the target activity is receiving data that has been transformed, it must have a "request" data schema, which is either automatically provided or can be defined while configuring the activity or transformation.
  • If the target activity is receiving data that has not been transformed, a "request" file schema does not need to be defined, as it is not used in the operation.
  • If a specific type of target activity provides a response, then you can also have a "response" data schema. If you want to write the response to another target, the "response" data schema is either automatically provided (SOAP and application activities) or can be defined while configuring the activity or transformation (HTTP). If the target type provides a response, an operation is not required to write the response to another target; that is, a "response" schema may be provided but can be ignored within the operation if it is not required.

Activities that are typically (but not necessarily) used as targets include those with one of these words in the name of the activity:

  • Add
  • Create
  • Delete
  • Insert
  • Post
  • Put
  • Response
  • Upload
  • Update
  • Upsert
  • Write

Where to Define a Schema

Schemas can be defined either directly within a transformation or as part of an activity. Note that a schema defined in a transformation takes precedence over a schema provided in an adjacent activity.

Where you choose to define a schema depends on your use case.

One strategy is to define a schema within an activity before configuring a transformation, so that the schema is inherited by the transformation. You may want to do this if you want to reference the activity with the same schema in other operations. Note that transformations where one or both schemas are provided by an adjacent activity are not reusable by reference.

Another strategy is to define a schema within a transformation. You may want to define both schemas within a transformation if you want to be able to reference the transformation within multiple operations. Or you may want to reference the activity with a different schema in other operations, or mirror the schema from one side of the transformation to the other.

Schemas defined in a transformation always take precedence over those defined in an adjacent activity. To clear a schema that has already been defined in a transformation, use the gear icon to select Clear Schema to have the transformation inherit the schema from an adjacent activity, if present.

On This Page

Last updated:  Dec 11, 2019

  • No labels