Scripting Interface Steps - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

Scripting Interface Steps

To import objects into the repository with the MDS XML scripting interface:

1 Create an XML script to import AIMs, MDS users, and application groups and import, update or delete user-defined objects and collections.

2 Run the metaxml utility and specify the name of the XML script to import the data from the script.

The syntax is:

metaxml import mdsUser mdsPassword xml_filename

The usual MDS permissions apply to being able to import data into the MDS repository.

For more information on running the metaxml utility, see the Teradata Meta Data Services Administrator Guide (B035‑3118).

To export objects from the repository with the MDS XML scripting interface:

✔ Run the metaxml utility and identify the MDS metamodel name(s) or meta data objects on the command-line as one of the parameters to the metaxml utility as part of the “export” request.

metaxml export mdsUser mdsPassword {-ocoll <objectID> | -mcoll <AIM_name> | -model <name>}-ofile <XML output file> [-v] [-l <label>]
 

Table 52: metaxml Export Input Parameters 

Parameter

Description

export

The export command indicates that metaxml is to be used to export a metamodel definition (not meta data) from the repository into an XML file.

mdsPassword

Password of the MDS user

mdsUser

Name of a valid Meta Data Services repository user.

-ocoll objectID

Identifies the Object ID of the repository object from which to start the export. This object, and all its destination collection objects, will be included in the resulting XML file.

-mcoll AIM_Name

Identifies the name of the AIM (metamodel) whose objects will be exported. Every object from each class in the AIM will be exported into the resulting XML file, and all object associations will be identified.

Note: Object associations to/from classes within other metamodels are ignored and a warning is displayed to that effect.

-model name

Identifies the name of the meta model to export. All classes, class properties and relationships of the named meta model will be included in the resulting XML file

-ofile XML output file

Identifies the XML file name into which the objects will be exported. If the filename is not fully qualified, the file will be created in the current directory.

If the file exists, it will be over-written without warning

-v
(Optional)

Requests that the utility output more verbose information to the console. The utility shows only a minimal amount of progress information if not used.

Note: Parameter is ignored when exporting metamodels with the -model parameter.

-l label
(Optional)

Specifies the name of the label to use in finding the object versions to export. When used, only the particular version of each object in the destination collection which has the label applied, if any, will be exported to the output file.

In a versioned repository, if the source object itself does not have the label applied to any of its versions, no objects will be exported, and a warning message will indicate this. When no label is specified, the latest (or published) version of each object is exported.

Note: Parameter is ignored when exporting metamodels with the -model parameter.

If only one metamodel is listed for the export, the resulting XML file has the same name as the metamodel name adding an XML extension; if more than one metamodel is listed, the resulting XML file is named mdsexport.xml. In either case, the file is placed in the same directory from where the request is run. Also, the XSD file is added and assumed to be in the standard location; this can be changed as necessary or desired, of course.

The usual MDS permissions apply to being able to export data out of the MDS repository.

See the Teradata Meta Data Services Administrator Guide (B035‑3118) for more information on running the metaxml utility.