<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/VDB+Definition">VDB Definition</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (4)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>    &lt;!-- VDB properties --&gt; <br></td></tr>
            <tr><td class="diff-changed-lines" >&lt;property <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">name=&quot;UseConnectorMetadata&quot;</span> <span class="diff-added-words"style="background-color: #dfd;">name=&quot;lib&quot;</span> value=&quot;...&quot; /&gt; <br></td></tr>
            <tr><td class="diff-unchanged" > <br>    &lt;import-vdb name=&quot;...&quot; version=&quot;...&quot; import-data-policies=&quot;TRUE|FALSE&quot;/&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >*Property Elements* <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">_UseConnectorMetadata_</span> <span class="diff-added-words"style="background-color: #dfd;">_cache-metadata_</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Setting to use connector supplied metadata. Can be &quot;true&quot; or &quot;cached&quot;.  &quot;true&quot; will obtain metadata once for every launch of Teiid.   &quot;cached&quot; will save a file containing the metadata into the PROFILE{{/data/teiid}} directory <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Can be &quot;true&quot; or &quot;false&quot;.  defaults to &quot;false&quot; for -vdb.xml deployments otherwise &quot;true&quot;.  If &quot;false&quot;, Teiid will obtain metadata once for every launch of the vdb.   &quot;true&quot; will save a file containing the metadata into the PROFILE{{/data/teiid}} directory <br></td></tr>
            <tr><td class="diff-unchanged" > <br>* _query-timeout_ <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>A VDB or virtual database definition is contained in an XML file. For .vdb archive files created in the design tool, this file is embedded in the archive and most field can be updated through tooling. The XML schema for this file can be found in the teiid-docs/schema directory.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example VDB XML</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: xml; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
&lt;vdb name="${vdb-name}" version="${vdb-version}"&gt;

    &lt;!-- VDB properties --&gt;
    &lt;property name="lib" value="..." /&gt;

    &lt;import-vdb name="..." version="..." import-data-policies="TRUE|FALSE"/&gt;

    &lt;!-- define a model fragment for each data source --&gt;
    &lt;model name="${model-name}"&gt;

        &lt;property name="..." value="..." /&gt;

        &lt;source name="${source-name}" translator-name="${translator-name}" connection-jndi-name="${deployed-jndi-name}"&gt;

    &lt;/model&gt;

    &lt;!-- create translator instances that override default properties --&gt;
    &lt;translator name="${translator-name}" type="${translator-type}" /&gt;

        &lt;property name="..." value="..." /&gt;

    &lt;/translator&gt;
&lt;/vdb&gt;
</pre>
</div></div>

<h1><a name="VDBDefinition-VDBElement"></a>VDB Element</h1>

<p><b>Attributes</b></p>

<ul>
        <li><em>name</em><br/>
The name of the VDB.  The VDB name referenced through the driver or datasource during the connection time.</li>
</ul>


<ul>
        <li><em>version</em><br/>
The version of the VDB (should be an positive integer).  This determines the deployed directory location (see Name), and provides an explicit versioning mechanism to the VDB name.</li>
</ul>


<p><b>Property Elements</b></p>

<ul>
        <li><em>cache-metadata</em><br/>
Can be "true" or "false".  defaults to "false" for -vdb.xml deployments otherwise "true".  If "false", Teiid will obtain metadata once for every launch of the vdb.   "true" will save a file containing the metadata into the PROFILE{{/data/teiid}} directory</li>
</ul>


<ul>
        <li><em>query-timeout</em><br/>
Sets the default query timeout in milliseconds for queries executed against this VDB.  0 indicates that the server default query timeout should be used.  Defaults to 0.  Will have no effect if the server default query timeout is set to a lesser value.  Note that clients can still set their own timeouts that will be managed on the client side.</li>
</ul>


<ul>
        <li><em>lib</em><br/>
Set to a list of modules for the vdb classpath for user defined function loading.  See also <a href="/author/display/TEIID/Support+for+User-Defined+Functions+%28Non-Pushdown%29" title="Support for User-Defined Functions (Non-Pushdown)">Support for User&#45;Defined Functions &#40;Non&#45;Pushdown&#41;</a>.</li>
</ul>


<h1><a name="VDBDefinition-importvdbElement"></a>import-vdb Element</h1>

<p><b>Attributes</b></p>

<ul>
        <li><em>name</em><br/>
The name of the VDB to be imported.</li>
</ul>


<ul>
        <li><em>version</em><br/>
The version of the VDB to be imported (should be an positive integer).</li>
</ul>


<ul>
        <li><em>import-data-policies</em><br/>
Optional attribute to indicate whether the data policies should be imported as well.  Defaults to TRUE.</li>
</ul>


<h1><a name="VDBDefinition-ModelElement"></a>Model Element</h1>

<p><b>Attributes</b></p>

<ul>
        <li><em>name</em><br/>
The name of the model is used as a top level schema name for all of the metadata imported from the connector.  The name should be unique among all Models in the VDB and should not contain the '.' character.</li>
</ul>


<ul>
        <li><em>version</em><br/>
The version of the VDB (should be an positive integer).  This determines the deployed directory location (see Name), and provides an explicit versioning mechanism to the VDB name.</li>
</ul>


<p><b>Source Element</b></p>

<p>A source is a named binding of a translator and connection source to a model.</p>

<ul>
        <li><em>name</em><br/>
The name of the source to use for this model. This can be any name you like, but will typically be the same as the model name.  Having a name different than the model name is only useful in multi-source scenarios.        In multi-source, the source names under a given model must be unique.  If you have the same source bound to multiple models it may have the same name for each.  An exception will be raised if the same source name is used for different sources.</li>
</ul>


<ul>
        <li><em>translator-name</em><br/>
The name or type of the Teiid Translator to use.  Possible values include the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.) and translators defined in the translators section.</li>
</ul>


<ul>
        <li><em>connection-jndi-name</em><br/>
The JNDI name of this source's connection factory. There should be a corresponding "-ds.xml" file that defines the connection factory in the JBoss AS.  Check out the  deploying VDB dependencies section for info. You also need to deploy these connection factories before you can deploy the VDB.</li>
</ul>


<p><b>Property Elements</b></p>

<ul>
        <li><em>importer.&lt;propertyname&gt;</em><br/>
Property to be used by the connector importer for the model for purposes importing metadata.  See possible property name/values in the Translator specific section. Note that using these properties you can narrow or widen the data elements available for integration.</li>
</ul>


<h1><a name="VDBDefinition-TranslatorElement"></a>Translator Element</h1>

<p><b>Attributes</b></p>

<ul>
        <li><em>name</em><br/>
The name of the the Translator.  Referenced by the source element.</li>
</ul>


<ul>
        <li><em>type</em><br/>
The base type of the Translator.  Can be one of the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.).</li>
</ul>


<p><b>Property Elements</b></p>

<ul>
        <li>Set a value that overrides a translator default property.  See possible property name/values in the Translator specific section.</li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/VDB+Definition">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646285&revisedVersion=6&originalVersion=5">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/VDB+Definition?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>