JBoss Community Archive (Read Only)

Teiid 8.12

Dynamic VDBs

Teiid integration is available via a "Dynamic VDB" without the need for Teiid Designer tooling. See the kit's "teiid-example/dynamicvdb-*" for working examples.

Dynamic VDBs take two forms - a simple xml deployment and a full zip file.

XML Deployment

You can simply create a SOME-NAME-vdb.xml file. The XML file captures information about the VDB, the sources it integrate, and preferences for importing metadata.

The VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to recognize this file.

The vdb-deployer.xml schema for this file is available in the schema folder under the docs with the Teiid distribution.

VDB Zip Deployment

For more complicated scenarios you are not limited to just an xml file deployment. A full zip file similar to a Designer VDB may also be deployed. In a vdb zip deployment:

  • The deployment must end with the extension .vdb

  • The vdb xml file must be name vdb.xml and placed in the zip under /META-INF/vdb.xml

  • If a /lib folder exists any jars found underneath will automatically be added to the vdb classpath.

  • For backwards compatability with Designer VDBs, ff any .INDEX file exists the default metadata repository will be assumed to be INDEX.

  • Files within the VDB zip are accessible by a Custom Metadata Repository using the MetadataFactory.getVDBResources() method, which returns a map of all VDBResources in the VDB keyed by absolute path relative to the vdb root.

  • The built-in DDL-FILE metadata repository type may be used to define DDL-based metadata in files outside of the vdb.xml. This improves the memory footprint of the vdb metadata and the maintainability of vdb.xml.

Example VDB Zip Structure

In the above example the vdb.xml could use a DDL-FILE metadata type for schema1:

<model name="schema1" ...
   <metadata type="DDL-FILE">/ddl/schema1.ddl</metadata>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:26:26 UTC, last content change 2014-09-26 15:05:07 UTC.