/META-INF
vdb.xml
/ddl
schema1.ddl
/lib
some-udf.jar
VDBs Without Tooling
Teiid integration is available via a VDB without the need for Teiid Designer tooling.
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.
Note
|
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 allVDBResources
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.
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>
</model>