<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/Translators">Translators</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~van.halbert">Van Halbert</a>
    </h4>
        <br/>
                         <h4>Changes (1)</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" >| SupportsDirectQueryProcedure | Set to true to indicate the translator supports the direct execution of commands | false | <br>| ThreadBound | Set to true to indicate the translator&#39;s Executions should be processed by only a single thread | false | <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">| CopyLobs | If true, then returned lobs (clob, blob, sql/xml) will be copied by the engine in a memory safe manner. Use this option if the source does not support memory safe lobs or you want to disconnect lobs from the source connection. | false <br></td></tr>
            <tr><td class="diff-unchanged" >\\ <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The Teiid Connector Architecture (TCA) provides Teiid with a robust  mechanism for integrating with external systems.  The TCA defines a common client interface between Teiid and an external system that includes metadata as to what SQL constructs are supported for pushdown and the ability to import metadata from the external system.</p>

<p>A Translator is the heart of the TCA and acts as the bridge logic between Teiid and an external system, which is most commonly accessed through a JCA resource adapter.  Refer to the Teiid Developers Guide for details on developing custom Translators and JCA resource adapters for  use with Teiid.</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The  TCA is not the same as the JCA, the JavaEE Connector Architecture,  although the TCA is designed for use with JCA resource adapters.</td></tr></table></div>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The import capabilities of Teiid Translators is currently only used in <a href="/author/display/TEIID/Dynamic+VDBs" title="Dynamic VDBs">Dynamic VDBs</a> and not by Teiid Designer.</td></tr></table></div>

<p>A Translator is typically paired with a particular JCA resource adapter.  In instances where pooling, environment dependent configuration management, advanced security handling, etc. are not needed, then a JCA resource adapter is not needed. The configuration of JCA ConnectionFactories for needed resource adapters is not part of this guide, please see the Teiid Administrator Guide and the kit examples for configuring resource adapters for use in JBossAS.</p>

<p>Translators can have a number of configurable properties.  These are broken down into execution properties, which determine aspects of how data is retrieved, and import settings, which determine what metadata is read for import.</p>

<p>The execution properties for a translator typically have reasonable defaults.  For specific translator types, e.g. the Derby translator, base execution properties are already tuned to match the source.  In most cases the user will not need to adjust their values.</p>

<p><b>Base Execution Properties - shared by all translators</b></p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Default </th>
</tr>
<tr>
<td class='confluenceTd'> Immutable </td>
<td class='confluenceTd'> Set to true to indicate that the source never changes. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> RequiresCriteria </td>
<td class='confluenceTd'> Set to true to indicate that source SELECT/UPDATE/DELETE queries require a where clause. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> SupportsOrderBy </td>
<td class='confluenceTd'> Set to true to indicate that the ORDER BY clause is supported. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> SupportsOuterJoins </td>
<td class='confluenceTd'> Set to true to indicate that OUTER JOINs are supported. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> SupportsFullOuterJoins </td>
<td class='confluenceTd'> If outer joins are supported, true indicates that FULL OUTER JOINs are supported. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> SupportsInnerJoins </td>
<td class='confluenceTd'> Set to true to indicate that INNER JOINs are supported. </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> SupportedJoinCriteria </td>
<td class='confluenceTd'> If joins are supported, defines what criteria may be used as the join criteria.  May be one of (ANY, THETA, EQUI, or KEY). </td>
<td class='confluenceTd'> ANY </td>
</tr>
<tr>
<td class='confluenceTd'> MaxInCriteriaSize </td>
<td class='confluenceTd'> If in criteria are supported, defines what the maximum number of in entries are per predicate.  &#45;1 indicates no limit. </td>
<td class='confluenceTd'> &#45;1 </td>
</tr>
<tr>
<td class='confluenceTd'> MaxDependentInPredicates </td>
<td class='confluenceTd'> If in criteria are supported, defines what the maximum number of predicates that can be used for a dependent join. Values less than 1 indicate to use only one in predicate per dependent value pushed (which matches the pre-7.4 behavior). </td>
<td class='confluenceTd'> &#45;1 </td>
</tr>
<tr>
<td class='confluenceTd'> DirectQueryProcedureName </td>
<td class='confluenceTd'> if the direct query procedure is supported on the translator, this property indicates the name of the procedure. </td>
<td class='confluenceTd'> native </td>
</tr>
<tr>
<td class='confluenceTd'> SupportsDirectQueryProcedure </td>
<td class='confluenceTd'> Set to true to indicate the translator supports the direct execution of commands </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> ThreadBound </td>
<td class='confluenceTd'> Set to true to indicate the translator's Executions should be processed by only a single thread </td>
<td class='confluenceTd'> false </td>
</tr>
<tr>
<td class='confluenceTd'> CopyLobs </td>
<td class='confluenceTd'> If true, then returned lobs (clob, blob, sql/xml) will be copied by the engine in a memory safe manner. Use this option if the source does not support memory safe lobs or you want to disconnect lobs from the source connection. </td>
<td class='confluenceTd'> false
<br class="atl-forced-newline" /></td>
</tr>
</tbody></table>
</div>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Only a subset of the supports metadata can be set through execution properties.  If more control is needed, please consult the <a href="/author/display/TEIID/Developer%27s+Guide" title="Developer&#39;s Guide">Developer's Guide</a>.</td></tr></table></div>

<p>There are no base importer settings.</p>

<h3><a name="Translators-OverrideExecutionProperties"></a>Override Execution Properties</h3>

<p>For all the translators to override Execution Properties can be configured in the <em>vdb.xml</em> file.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example Overriding of Translator Property</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: xml; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">

&lt;model name="ora"&gt;
     &lt;source name="ora" translator-name="oracle-override" connection-jndi-name="java:/oracle"/&gt;
&lt;/model&gt;

&lt;translator name="oracle-override" type="oracle"&gt;
     &lt;property name="RequiresCriteria" value="true"/&gt;
&lt;/translator&gt;
</pre>
</div></div>

<p>The above XML fragment is overriding the <em>oracle</em> translator and altering the behavior of <em>RequiresCriteria</em> property to true. Note that the modified translator is only available in the scope of this VDB.</p>

<p>See also <a href="/author/display/TEIID/VDB+Definition" title="VDB Definition">VDB Definition</a>.</p>

<h3><a name="Translators-ParameterizableNativeQueries"></a><a name="Translators-native"></a>Parameterizable Native Queries</h3>

<p>In some situations the teiid_rel:native-query property and native procedures accept parameterizable strings that can positionally reference IN parameters. A parameter reference has the form $integer, i.e. $1 Note that 1 based indexing is used and that only IN parameters may be referenced. Dollar-sign integer is therefore reserved, but may be escaped with another $, i.e. $$1.  The value will be bound as a prepared value or a literal is a source specific manner. The native query must return a result set that matches the expectation of the calling procedure.</p>

<p>For example the native-query "select c from g where c1 = $1 and c2 = '$$1'" results in a JDBC source query of "select c from g where c1 = ? and c2 = '$1'", where ? will be replaced with the actual value bound to parameter 1.</p>
    </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/Translators">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646290&revisedVersion=50&originalVersion=49">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Translators?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>