Previous Page | Next Page

Reference for the Metadata Engine

LIBNAME Statement for the Metadata Engine


Overview: Metadata LIBNAME Statement

To learn how the metadata engine works, see Introduction to the Metadata LIBNAME Engine.

The SAS Metadata Server must be running before you submit the metadata LIBNAME statement. The required metadata must already exist in the metadata server. (If you specify METAOUT=DATA, table metadata is not required.) For the necessary metadata, see Reference to Metadata Objects for the Metadata Engine.

In the syntax, wherever quotation marks are optional, they can be single or double quotation marks.


Syntax: Metadata LIBNAME Statement

LIBNAME libref
META
LIBID=<">identifier<"> | LIBRARY=<">name<"> |
LIBRARY="/folder-pathname/name" | LIBURI="URI-format"
<server-connection-arguments>
<METAOUT=ALL | DATA | DATAREG | META>
<CONOPTSET="propertyset-object">
<LIBOPTSET="propertyset-object">;

Required Arguments

libref

specifies a SAS name that serves as a shortcut name to associate with metadata in the SAS Metadata Repository on the metadata server. This name must conform to the rules for SAS names. A libref cannot exceed eight characters.

META

is the name of the metadata engine.

LIBID=<">identifier<"> | LIBRARY=<">name<"> | LIBRARY="/folder-pathname/name" | LIBURI="URI-format"

specifies a SASLibrary object, which defines a SAS library. This SAS library contains the data that you want to process.

LIBID=<">identifier<">

specifies the 8- or 17-character metadata identifier of the SASLibrary object. Examples are libid=AW000002 and libid="A57DQR88.AW000002" . For more information, see Metadata Object Identifiers and URIs.

LIBRARY=<">name<">

specifies the value in the SASLibrary object's Name= attribute. An example is library=mylib . The maximum length is 256 characters.

Alias: LIBRNAME=
LIBRARY="/folder-pathname/name"

specifies the folder pathname and the value in the SASLibrary object's Name= attribute. The pathname is the object's location in a SAS folder. The pathname begins with a forward slash. An example is library="/Users/Dmitri/My Folder/test/mylib" . The maximum length is 256 characters.

LIBURI="URI-format"

specifies a URI, which is a standard from SAS Open Metadata Architecture. For more information, see Metadata Object Identifiers and URIs. The following URI formats are supported.

LIBURI="identifier.identifier"

specifies the full 17-character metadata identifier, which references both the repository and the object. This syntax is equivalent to specifying both LIBID= and REPID=. An example is liburi="A57DQR88.AW000002".

LIBURI="SASLibrary/identifier.identifier"

specifies the SASLibrary object type, followed by the full 17-character metadata identifier. This syntax is equivalent to specifying both LIBID= and REPID=. An example is liburi="SASLibrary/A57DQR88.AW000002".

LIBURI="SASLibrary?@attribute='value'"

specifies the SASLibrary object type, followed by a search string. Examples are liburi="SASLibrary?@libref='mylib'" and liburi=" SASLibrary?@engine='base'".

Requirement: You must enclose the LIBURI= value in quotation marks.

Server Connection Arguments

The following LIBNAME statement arguments for the metadata engine establish a connection to the metadata server. For more information, see Introduction to Connection Options.

METASERVER=<">host-name<">

specifies the host name or network IP address of the computer that hosts the metadata server. The value localhost can be used if the SAS session is connecting to the metadata server on the same computer. If you do not specify this argument, the value of the METASERVER= system option is used; for more information, see METASERVER= System Option. The maximum length is 256 characters.

Alias: HOST=
IPADDR=
PASSWORD=<">password<">

specifies the password for the user ID on the metadata server. If you do not specify this argument, the value of the METAPASS= system option is used; for more information, see METAPASS= System Option. The maximum length is 256 characters.

Alias: METAPASS=
PW=
PORT=<">number<">

specifies the TCP port that the metadata server listens to for connections. This port number was used to start the metadata server. If you do not specify this argument, the value of the METAPORT= system option is used; for more information, see METAPORT= System Option. The default for the METAPORT= system option is 8561. The range is 1-65535.

Alias: METAPORT=
PROTOCOL=BRIDGE

specifies the network protocol for connecting to the metadata server. If you do not specify this argument, the value of the METAPROTOCOL= system option is used; for more information, see METAPROTOCOL= System Option. In this release, the only supported value is BRIDGE, which specifies the SAS Bridge protocol.

Alias: METAPROTOCOL=
Requirement: Do not enclose the value in quotation marks.
REPID=<">identifier<"> | REPNAME=<">name<">

specifies the repository that contains the SASLibrary object. If you specify both REPID= and REPNAME=, REPID= takes precedence over REPNAME=. If you do not specify REPID= or REPNAME=, the value of the METAREPOSITORY= system option is used; for more information, see METAREPOSITORY= System Option. The default for the METAREPOSITORY= system option is Foundation.

REPID=<">identifier<">

specifies an 8-character identifier. This identifier is the first half of the SASLibrary's 17-character identifier, and is the second half of the repository's identifier. For more information, seeMetadata Object Identifiers and URIs.

REPNAME=<">name<">

specifies the value in the repository's Name= attribute. The maximum length is 256 characters.

Alias: METAREPOSITORY=
REPOS=
REPOSITORY=
USER=<">userid<">

specifies the user ID for an account that is known to the metadata server. For information about user definitions, see the SAS Intelligence Platform: Security Administration Guide. If you do not specify this argument, the value of the METAUSER= system option is used; see METAUSER= System Option. The maximum length is 256 characters.

Alias: ID=
METAUSER=
USERID=

METAOUT= Argument

METAOUT=ALL | DATA | DATAREG | META

specifies the metadata engine's output processing of tables in the data source.

Default: ALL
Restriction: The following descriptions refer to the physical table. Metadata is read-only with the metadata engine. When you create, update, or delete physical data with the metadata engine, you must perform an additional step if you want to update the metadata. You can use a product like SAS Management Console, or you can submit the METALIB procedure. For more information, see METALIB Procedure.
Restriction: As a LIBNAME statement argument, the behavior applies to all members in the library, and remains for the duration of the library assignment. To specify METAOUT= behavior for an individual table, use the METAOUT= data set option.
Interaction: If metadata for a table is defined, any authorizations for that table are enforced, regardless of the METAOUT= value.

ALL

specifies that you can read, create, update, and delete observations in existing physical tables that are defined in metadata. You cannot create or delete entire physical tables. This is the default behavior.

Interaction: The user is restricted to only the tables that have been defined in the repository.
DATA

specifies that you can read, create, update, and delete physical tables.

Interaction: The user can access any table, regardless of whether it has been defined in the repository.
DATAREG

specifies that you can read, update, and delete physical tables that are defined in metadata. You can create a table, but you cannot read, update, or delete the new table until it is defined in metadata. This value is like ALL, but it adds the ability to create new tables.

Interaction: The user is restricted to only the tables that have been defined in the repository.
META

specifies that you can read physical tables that are defined in metadata. You cannot create, update, or delete physical tables or observations. This value is like ALL, without the ability to create, update, and delete observations.

Interaction: The user is restricted to only the tables that have been defined in the repository.
Caution: The METAOUT=META value might not be supported in future releases of the software.

CONOPTSET= and LIBOPTSET= Arguments

If you do not specify the CONOPTSET= or LIBOPTSET= arguments, the default options for the constructed LIBNAME statement are used. For more information, see How the Metadata Engine Constructs Options. See also Examples: CONOPTSET= or LIBOPTSET= Argument.

CONOPTSET=<">propertyset-object<">

specifies a PropertySet object that is associated with the SASClientConnection object that corresponds to the SASLibrary object specified by the LIBID=, LIBRARY=, or LIBURI= argument. The Property objects that are associated with this PropertySet object are used as connection arguments for the constructed LIBNAME statement for the underlying engine. A SASClientConnection object exists only for engines that connect to a server, such as the SAS/ACCESS engines. The maximum length is 60 characters.

LIBOPTSET=<">propertyset-object<">

specifies a PropertySet object that is associated with the SASLibrary object specified by the LIBID=, LIBRARY=, or LIBURI= argument. The Property objects that are associated with this PropertySet object are used as statement arguments for the constructed LIBNAME statement for the underlying engine. The maximum length is 60 characters.

Previous Page | Next Page | Top of Page