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.
Rules and guidelines for hierarchical schemas
Consider the following rules and guidelines when you create a hierarchical schema to associate with a Hierarchy Parser transformation:
•The schema must be smaller than 10,000 elements.
•The schema can contain up to 10,000 fields.
•The schema can contain up to 500 groups.
•The schema can contain up to 20 levels of data hierarchy.
•Schemas that contain more than 5,000 ports and more than 100 groups might affect the processing time.
Creating a hierarchical schema
To create a hierarchical schema, define general properties and upload a sample or schema file.
1Click New > Components > Hierarchical Schema.
2On the New Hierarchical Schema page, specify a name and location for the hierarchical schema, or use the default values.
3Optionally, enter a description of the hierarchical schema.
4Click Upload to select a file as the basis of the hierarchical schema.
5In the Upload Schema/Sample File dialog box, click Choose File to browse for a file, and then click OK to upload it.
6If you upload an XSD file that references other XSD files, Data Integration displays a list of the referenced files. Click Upload to upload each referenced file.
7If you upload an XSD file with multiple possible root elements, select a root element from the drop-down menu.