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 initially 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. A schema defined in a transformation takes precedence over a schema provided in an initially adjacent activity.

Server-based connectors automatically fetch a schema from the endpoint during configuration of an activity. Thus, they always provide a schema that can be inherited by a transformation.

File-based connectors allow you the option to define a schema in the activity configuration, though it is not required to define one there. All transformations are reusable regardless of where their schemas come from. However, there are special considerations when a transformation with a schema provided by an activity is referenced in another operation, as described in Transformation Reuse.

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 a currently or previously adjacent activity.

 

  • No labels