1. Trang chủ
  2. » Công Nghệ Thông Tin

SAS/Warehouse Administrator 2.3 Metadata API- P37 doc

5 172 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Table of Contents

    • Contents

  • Introduction to the Metadata API

    • Changes and Enhancements

    • Prerequisites

    • What is Metadata?

    • What is the SAS/Warehouse Administrator Metadata API?

    • What Can I Do with the SAS/Warehouse Administrator Metadata API?

    • How the Metadata API Works

    • Identifying Metadata

    • Reading Metadata: A Simple Example

    • Metadata Repositories

      • Setting the Active Metadata Repository

    • Learning to Use the Metadata API

    • Naming Conventions Used in This Manual

    • Where Metadata API Classes and SLISTS are Stored

  • Metadata API Class

    • Overview of the Metadata API Class

    • Using the Metadata API Class

    • Introduction to Metadata API Methods

      • Conventions

      • Error Codes

      • Metadata Property List

    • Index to Metadata API Methods

  • SAS/Warehouse Administrator Metadata Types

    • Overview of SAS/Warehouse Administrator Metadata Types

      • What Is a Metadata Type?

      • Metadata Repository Types

    • Metadata Type Inheritance

    • Using Metadata Types

      • Relationships Among Metadata Types

      • Writing Metadata

      • Overview of the Process Editor

      • Reading Process Flow Metadata

      • Input Tables, Output Tables, and Job Metadata

      • Reading Job Metadata

      • Reading Job Flow Metadata

      • Reading Job Hierarchy Metadata

      • Using Icon Information

    • Index to SAS/Warehouse Administrator Metadata Types

    • Using the Metadata Type Dictionary

      • General Identifying Information

  • Sample Metadata API Code

    • Appendix Overview

    • Read Metadata Code Sample

    • Write Metadata Code Sample

  • Metadata Type Inheritance Tree

    • SAS/Warehouse Administrator Metadata Type Inheritance Tree

  • Recommended Reading

    • Recommended Reading

  • Glossary

  • Index

Nội dung

SAS/Warehouse Administrator Metadata Types WHMDDSTR 177 ICON specifies the catalog entry name of the associated icon. For more information about icons, see “Using Icon Information” on page 69. LIBREF specifies the libref to assign to the metadata repository. OPTIONS specifies an SCL list of libname statement options. For a DBMS connection library, the list includes SQL options, USERID, PASSWORD, and other options that are required for the connection. This property contains the registered user ID or password only if the API application is a secure application. The only secure applications that are currently supported are those registered as add-in generators. See the SAS/Warehouse Administrator User’s Guide for documentation on add-in generators. If the API application is not secure, this property returns a blank value if no password has been registered, and it returns XXXXXXXX if the password has been registered. PATH specifies an SCL list of host-specific path designations. If the list contains more than one entry, then it is assumed that the libname is a concatenated libname and that each list entry is a directory in the concatenation. PREASSIGNED specifies the numeric indicator that states whether this libname is preassigned. It has a possible value of 0 (needs to be assigned) or 1 (is already assigned). TABLES specifies an SCL list of general identifying information about the tables that are registered as residing in this library. Using WHLIBRY Add Update Delete Yes Yes Yes WHLIBRY is an independent type. To understand how it relates to other types, see the physical storage models in “Relationships Among Metadata Types” on page 53. WHMDDSTR Metadata type for OLAP MDDB physical store Category: Physical Storage Types Parent “WHSASSTR” on page 231 178 WHMDDSTR Chapter 3 Overview WHMDDSTR models the metadata for OLAP MDDB physical data stores in SAS/Warehouse Administrator. Properties The following table lists all of the properties for WHMDDSTR and indicates how you can use each property with metadata API methods. In the table, you can specify properties with a Ye s in the Indirect Add column when you indirectly add one object through another, as described in the documentation for the _UPDATE_METADATA_ method. Use this approach to add a new dependent object. For details, see “Using _UPDATE_METADATA_” on page 46. You can pass properties with a Ye s in the Update column to the _UPDATE_METADATA_ method, as described in the documentation for this method. Use this method to update properties of an existing object. For details, see “Using _UPDATE_METADATA_” on page 46. * Req indicates that the property is required; you must provide a value for this property when you use a given method. * Default indicates that the system will provide a default value for that property if you do not provide one. * Auto supplied means that the property is automatically supplied; any value that you specify for such a property is ignored. Properties with a Ye s in the Read Method Expand Parm column are valid with the expand parameter of the _GET_METADATA_ method. This method enables you to get detailed metadata about a property and its associated objects through a single method call. Properties Type Indirect Add Update Method Read Method Expand Parm. Cvalue C Yes Yes No Desc C Yes No No Extended Attributes L Yes Yes Yes Host L Yes Yes No Id C * Req * Req No Indexes L No No Yes Library L Yes Yes No Load Technique C Yes Yes No Metadata Created C * Auto No No Metadata Updated C * Auto No No Name C No No No Note L No No Yes NValue N Yes Yes No Table L * Auto supplied No No Table Name C Yes Yes No Table Options L * Default * Default No SAS/Warehouse Administrator Metadata Types WHNOTE 179 Using WHMDDSTR Add Update Delete No Yes No WHMDDSTR is a dependent type, like its parent, WHSASSTR. WHNOTE Metadata type for notes Category: Text File Types Parent “WHTXTCAT” on page 268 Overview WHNOTE models the metadata for notes in SAS/Warehouse Administrator. Notes are user-entered descriptions of objects, columns, or processes. In SAS/Warehouse Administrator, to add a note to an item, display the properties window for that item, go to the General tab or the Columns tab and click the Notes button. Notes can include any information that is useful to your organization, such as a description of the purpose of an item. Properties The following table lists all of the properties for WHNOTE and indicates how you can use each property with metadata API methods. In the table, you can specify properties with a Ye s in the Indirect Add column when you indirectly add one object through another, as described in the documentation for the _UPDATE_METADATA_ method. Use this approach to add a new dependent object. For details, see “Using _UPDATE_METADATA_” on page 46. You can pass properties with a Ye s in the Update column to the _UPDATE_METADATA_ method, as described in the documentation for this method. Use this method to update properties of an existing object. For details, see “Using _UPDATE_METADATA_” on page 46. * Req indicates that the property is required; you must provide a value for this property when you use a given method. * Default indicates that the system will provide a default value for that property if you do not provide one. * Auto supplied means that the property is automatically supplied; any value that you specify for such a property is ignored. Properties with a Ye s in the Read Method Expand Parm column are valid with the expand parameter of the _GET_METADATA_ method. This method enables you to get detailed metadata about a property and its associated objects through a single method call. 180 WHNOTE Chapter 3 Properties Type Indirect Add Update Method Read Method Expand Parm. Cvalue C Yes Yes No Desc C No Yes No Entry C Yes (see Property Dependencies) Yes (see Property Dependencies) No Extended Attributes L Yes Yes Yes Full Entry C Yes (see Property Dependencies) Yes (see Property Dependencies) No Id C Yes Yes No Library L Yes (see Property Dependencies) Yes (see Property Dependencies) No Metadata Created C No No No Metadata Updated C No No No Name C No Yes No Note L No No Yes NValue N Yes Yes No Property Dependencies When you add a note, you must specify entry information. This can be done in two ways: Specify the LIBRARY and ENTRY properties. Specify the FULL ENTRY property. Using WHNOTE Add Update Delete No Yes Yes WHNOTE is a dependent type. To understand how it relates to other types, see the general information model in “Relationships Among Metadata Types” on page 53. Use of _DELETE_METADATA for this type deletes SAS/Warehouse Administrator metadata, not the corresponding note. Reading Notes When you pass a WHNOTE object to the _GET_METADATA_ method, the method returns a copy of the note, not the actual note in the metadata. The copy is returned in a SAS catalog entry, normally in the WORK library. Because this is a copy, any modifications made to the contents of the catalog entry will not affect the actual note in the metadata. Here is example WHNOTE code: SAS/Warehouse Administrator Metadata Types WHNOTE 181 * Get the Note property of the object * whose id is object_id. */ l_notemeta=makelist(); l_notemeta=setnitemc(l_notemeta,object_id,’ID’); l_note=makelist(); l_notemeta=insertl(l_notemeta,l_note,-1,’NOTE’); call send(i_api,’_GET_METADATA_’,rc,l_notemeta); if rc = 0 then do; /* * Get the details of the Note if it has one. */ if listlen(l_note) > 0 then do; call send(i_api,’_GET_METADATA_’,rc,l_note,1); if rc = 0 then do; /* * Get the Details of the Library that * contains the copy of the Note. */ l_notelib=getniteml(l_note,’LIBRARY’); call send(i_api,’_GET_METADATA_’, rc,l_notelib,1); if rc = 0 then do; libref=getnitemc(l_notelib,’LIBREF’); entry=getnitemc(l_note,’ENTRY’); /* * Code here to assign library if */ needed. end; /* if */ end; /* if */ end; /* if */ end; /* if */ Updating Notes To modify the contents of a note, pass the corresponding metadata ID and WHNOTE type ID to the _UPDATE_METADATA_ method. A combination of the LIBRARY, ENTRY, and FULL ENTRY properties are required and must contain the location of the new contents of the note. The contents of the catalog entry that is passed will completely replace the existing contents of the note in the metadata. /* * Pull the copy of the Note into the * preview buffer and allow the . “Relationships Among Metadata Types” on page 53. WHMDDSTR Metadata type for OLAP MDDB physical store Category: Physical Storage Types Parent “WHSASSTR” on page 23 1 178 WHMDDSTR Chapter 3 Overview WHMDDSTR. Types Parent “WHTXTCAT” on page 26 8 Overview WHNOTE models the metadata for notes in SAS/Warehouse Administrator. Notes are user-entered descriptions of objects, columns, or processes. In SAS/Warehouse Administrator, . the general information model in “Relationships Among Metadata Types” on page 53. Use of _DELETE _METADATA for this type deletes SAS/Warehouse Administrator metadata, not the corresponding note. Reading

Ngày đăng: 05/07/2014, 07:20