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