File schemas can be inherited from activities that are adjacent to a transformation, or they can be defined directly in the transformation, as covered in this section. A schema defined directly within the transformation takes precedence over a schema defined as part of an activity.
These are the various ways to create a schema directly in a transformation:
Custom Flat Schema A flat schema is a simple, one-level field structure that has the same data row type throughout the text document. Custom flat schemas are created in CSV format.
Custom Hierarchical Schema A hierarchical schema is a complex file structure that contains multiple file row types such as header or summary rows. Custom hierarchical schemas can be created in XML or CSV format.
Sample File Schema If you already have a file available that contains the structure of data you want to use, you can use a sample file within a transformation.
Mirrored Schemas 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.
Schema Previously Provided by an Inherited Activity The ownership of a schema that was originally defined in an activity and is being inherited by a transformation is transferred to the transformation when the activity providing the schema is deleted.