Previous Page | Next Page

Introduction to the Metadata API

Learning to Use the Metadata API

The following are some steps you can take to learn the metadata API:

  1. Become familiar with the elements of the metadata API--primary repository, secondary repository, types, subtypes, type names, type IDs, and so on.

  2. Study the Read Metadata Code Sample and the Write Metadata Code Sample.

  3. Learn how to initialize the metadata API by executing simple API method calls that do not read any actual metadata. For example, list all the object types that are available in the API. List the properties for a given object in the API.

  4. Try some simple queries against the metadata of a well-known metadata object. Because this is just a test program, you can code the literal identifier of the object in your client application. For example, list all the detail tables that are defined in a warehouse.

  5. Try a more realistic task by using the code samples in Sample Metadata API Code as a starting point.

    1. Decide what information you need.

    2. Translate this information into metadata types and attributes.

    3. Determine how the different metadata types you need are related so that you will know how to access the metadata that you want.

      For example, if you want to list all of the owners that are defined for a given data warehouse and list all of the detail tables for which each owner is responsible, you must first get a list of all detail tables. Then you can list the owner of each detail table. For details about SAS/Warehouse Administrator metadata relationships, see Relationships Among Metadata Types.

    4. Write the client application.

    5. Run the application and compare the returned metadata with the actual metadata that you can view through the application.

Previous Page | Next Page | Top of Page