Activity Type: Relational
Retrieve physical metadata from a database, such as table sizes and row counts.
<extractPhysicalSchema name="extract"> <output name="schema"> </extractPhysicalSchema>
<extractPhysicalSchema name="extract"> <getTables name="littleblackbook"> <output name="schema"> </extractPhysicalSchema>
Element extractPhysicalSchema:
This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.JDBCConnectionProvider
OGSA-DAI/schema/ogsadai/xsd/activities/extract_database_schema.xsd
Implementations of this activity are database specific. The table below lists supported databases and corresponding classes for dynamically extracting the physical schema.
Database | Implementation class |
---|---|
MySQL | uk.org.ogsadai.activity.relational.MySQLExtractPhysicalSchemaActivity |
SQL Server | uk.org.ogsadai.activity.relational.SQLServerExtractPhysicalSchemaActivity |
DB2 | Unsupported |
PostgreSQL | Unsupported |
Oracle | Unsupported |
Alternatively, physical schema information may be provided by the service deployer in a static way. The following implementation loads a physical schema from a configuration file:
uk.org.ogsadai.activity.relational.PhysicalSchemaFileActivity
This implementation is actually independent of the type of data resource and does not require a specific data resource accessor. However, the resulting physical schema provides information on tables, rows and indexes.
When deploying the PhysicalSchemaFileActivity implementation the physical schema will not be extracted dynamically but is provided in a static way. This can be used, for example, if the database is not supported by the dynamic extractors or if dynamic extraction would be too costly. The static information is provided in a configuration file for the activity. The location of the configuration file is specified in the activity configuration document.
For example:
<database name="ogsadai" maxJoinSize="23234" joinBufferSize="99999"> <table name="littleblackbook" dataLength="100000" indexLength="0" avgRowLength="124" rowCount="10000" rowFormat="Compressed"/> </database>
Element database - root element of the configuration:
NOTE: For implementations that extract metadata dynamically (see above for supported databases) a configuration file need not be provided.
uk.org.ogsadai.client.toolkit.activity.relational.ExtractDatabaseSchema
Up: Activities | ||
© International Business Machines Corporation, 2002-2006. | © The University of Edinburgh, 2002-2006. |