0 / 0
Schema views in the Hierarchical Data stage in DataStage

Schema views in the Hierarchical Data stage

Create schema views to reduce the size of the schema tree, enhance the design experience, and improve the efficiency of the parsing and composing processes.

A schema view is a defined subset of a schema. Schema views are saved in the schema library manager so that they can be reused for different steps and different job designs.

Creating and deleting schema views

To reduce the size of the schema tree of a large schema, create a schema view from any XML element.

  1. Login to IBM Cloud Pak® for Data and go to your project.

  2. Create or open a DataStage flow containing the Hierarchical data stage.

  3. Double-click the Hierarchical Data stage to open the properties panel.

  4. Click Edit assembly.

  5. Click Open libraries.

  6. Open the library.
  7. Choose a schema to view its definitions and click Create view to create schema view.

  8. Input the view name and description. Choose the schema elements that you want to include in this schema view.
  9. Click Save to create the view.
  10. Specify the properties for the schema view.

To delete a schema view, choose a view and click Delete view. Creating a schema view based on a JSON schema is not supported.

Composing an XML file by using schema view

By creating a schema view from a large schema, you can use the composer step to compose XML data based on the structures and types defined in the schema view, rather than in the original schema.

XML schemas can be complicated. They can contain XML types, elements, structures, and definitions for many XML documents. They can contain thousands of XML nodes and provide large amounts of information. You can create views from those complex schemas to reduce the size of schema tree and simplify your composing design process.

You can use schema views to compose an XML document in the following cases:

  • If the XML schema contains the definitions of many types of XML documents and you want to compose XML data for one particular type, you can create a view for the XML document type from your XML schema and remove all the features that are not related to your document type from the view. You can then select the view as the document root for the XML composer step, define the mappings, and compose your XML documents.

  • If the schema that describes the XML data contains large amounts of information, you can define multiple views of your schema; each view describing one part of your XML schema. You can add one XML composer step for each view to build one part of your XML document. You can assemble all the generated parts by using the additional views and composer steps.

Parsing an XML file using schema views

The schema view allows you to simplify the assembly when parsing small XML files. You can create the view over the original schema to include only the required elements that are present in the XML file. This allows you to reduce the schema size without auto-chunked nodes in the schema. You can also import the view into the Parser step and parse the file easily once simplified.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more