Transformations > Hierarchy Builder transformation > Hierarchical schemas

Hierarchical schemas

A hierarchical schema is based on a schema file or sample file that you import to Data Integration. If you import a sample file, Data Integration generates a schema based on the structure of the sample file. The schema defines the expected hierarchy of the input data.
You can create a hierarchical schema in two ways. You can create a standalone hierarchical schema that can be associated with any transformation that you choose. Alternatively, you can create a hierarchical schema from within a specific transformation.
When you create a standalone hierarchical schema, you import a JSON sample file or XSD file as the basis of the schema.
You can associate the hierarchical schema with any transformation, whether you create it as a standalone hierarchical schema or as part of a specific transformation.
You can create, edit, or delete a hierarchical schema. You can edit a hierarchical schema and change the root or change the schema definition. However if you have used the hierarchical schema in a transformation, you cannot edit or delete it. Before you delete a hierarchical schema, verify that you did not use it in a transformation.

Sample or schema

When you create a hierarchical schema, you import a JSON sample file or an XSD schema as the basis of the schema.
It is recommended to use a schema, if available. The schema must not contain recursive elements.
If you use a sample, ensure that it is representative of the data that you expect to process with the transformation and that it is comprehensive. Ensure that the sample contains all the possible fields that the transformation might process, including permutations regarding values and types. The lengths of fields must be representative.

Creating a hierarchical schema

Create a hierarchical schema in Data Integration.
    1. Click New > Components > Hierarchical Schema.
    2. In the New Hierarchical Schema page, enter a name and description. You must provide a name for the hierarchical schema.
    3. Browse to select a project location.
    4. To select a schema or sample file, click Upload. Click Choose File and browse for an XSD file or select a sample JSON file, and then click OK.
    When you add a JSON sample file, Data Integration generates a schema from the sample.
    5. If you selected an XSD file with multiple possible root elements, select a root from the drop-down menu.
    6. If you selected a schema that refers to another schema, you must also upload the referenced schema. To upload the referenced schema, click Upload, browse for the referenced schema file and click OK.
    7. To save the hierarchical schema, click OK.