<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/Built-in+Translators">Built-in Translators</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (27)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">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. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. {color:#000000}{*}LDAP Translator{*}{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">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. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}The LDAP translator, known by the type name&amp;nbsp;{color}{color:#333333}{_}ldap{_}{color}{color:#333333}, exposes an LDAP directory tree relationally with pushdown support for filtering via criteria. This is typically coupled with the LDAP resource adapter.{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">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. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}{*}Execution Properties{*}{color}{color:#333333}&amp;nbsp;{color} <br>|| {color:#000000}Name{color} || {color:#000000}Description{color} || {color:#000000}Default{color} || <br>| {color:#333333}SearchDerfaultBaseDN{color} | {color:#333333}Default Base DN for LDAP Searches{color} | {color:#333333}null{color} | <br>| {color:#333333}SearchDefaultScope{color} | {color:#333333}Default Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE.{color} | {color:#333333}ONELEVEL_SCOPE{color} | <br>| {color:#333333}RestrictToObjectClass{color} | {color:#333333}Restrict Searches to objectClass named in the Name field for a table{color} | {color:#333333}false{color} | <br>| {color:#333333}UsePagination{color} | {color:#333333}Use a PagedResultsControl to page through large results. This is not supported by all directory servers.{color} | {color:#333333}false{color} | <br>| {color:#333333}ExceptionOnSizeLimitExceeded{color} | {color:#333333}Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.{color} | {color:#333333}false{color} | <br>{color:#333333}There are no import settings for the ldap translator; it also does not provide metadata.{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">*Base Execution Properties - shared by all translators* <br>|| Name || Description || Default || <br>| Immutable | Set to true to indicate that the source never changes. | false | <br>| RequiresCriteria | Set to true to indicate that source SELECT/UPDATE/DELETE queries require a where clause. | false | <br>| SupportsOrderBy | Set to true to indicate that the ORDER BY clause is supported. | false | <br>| SupportsOuterJoins | Set to true to indicate that OUTER JOINs are supported. | false | <br>| SupportsFullOuterJoins | If outer joins are supported, true indicates that FULL OUTER JOINs are supported. | false | <br>| SupportsInnerJoins | Set to true to indicate that INNER JOINs are supported. | false | <br>| SupportedJoinCriteria | If joins are supported, defines what criteria may be used as the join criteria.  May be one of (ANY, THETA, EQUI, or KEY). | ANY | <br>| MaxInCriteriaSize | If in criteria are supported, defines what the maximum number of in entries are per predicate.  \-1 indicates no limit. | \-1 | <br>| MaxDependentInPredicates | 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). | \-1 | <br>| NativeQueryProcedureName | if the native query is supported on the translator, this property indicates the name of the procedure. | native | <br>| SupportsNativeQueries | Set to true to indicate the translator supports the direct execution of commands using the *native* procedure | false | <br>\\ <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {color:#000000}{*}Metadata Directives{*}{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{note}Only a subset of the supports metadata can be set through execution properties.  If more control is needed, please consult the [Developer&#39;s Guide]. <br>{note} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}String columns with a default value of &quot;multivalued-concat&quot; will concatinate all attribute values together in alphabetical order using a ? delimiter. If a multivalued attribute does not have a default value of &quot;multivalued-concat&quot;, then any value may be returned.{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">There are no base importer settings. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {color:#000000}{*}Native Queries{*}{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. Override Execution Properties <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}LDAP procedures may optionally have native queries associated with them - see&amp;nbsp;{color}[Parameterizable Native Queries|Built-in Translators#native]. The operation prefix (select;, insert;, update;, delete; - see the native procedure logic below for more) must be present in the native-query, but it will not be issued as part of the query to the source. <br>{code:sql|title=Example DDL for an LDAP native procedure} <br>CREATE FOREIGN PROCEDURE proc (arg1 integer, arg2 string) OPTIONS (&quot;teiid_rel:native-query&quot; &#39;search;context-name=corporate;filter=(&amp;(objectCategory=person)(objectClass=user)(!cn=$2));count-limit=5;timeout=$1;search-scope=ONELEVEL_SCOPE;attributes=uid,cn&#39;) returns (col1 string, col2 string); <br>{code} <br>{note} <br>{color:#333333}Parameter values have reserved characters escaped, but are otherwise directly substituted into the query.{color}{note} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">For all the translators to override Execution Properties can be configured in the _vdb.xml_ file. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h4. {color:#000000}{*}Native Procedure{*}{color} <br>{warning} <br>{color:#333333}This feature is turned off by default because of the security risk this exposes to execute any command against the source. To enable this feature, override the translator property called &quot;SupportsNativeQueries&quot; to true. Look for&amp;nbsp;{color}[Override Execution Properties|Built-in Translators#Override Execution Properties]&amp;nbsp;above.{warning} <br>{color:#333333}LDAP translator provides a procedure with name&amp;nbsp;{color}{color:#333333}{*}native{*}{color}{color:#333333}&amp;nbsp;that gives ability to execute any ad-hoc native LDAP queries directly against the source without any Teiid parsing or resolving. The metadata of this procedure&#39;s execution results are not known to the Teiid, and they are returned as object array. User can use&amp;nbsp;{color}[ARRAYTABLE]&amp;nbsp;construct to build tabular output for consumption by client applications. Since there is no known direct query language for LDAP, Teiid exposes this procedure with a simple query structure as below <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{code:XML|title=Example Overriding of Translator Property} <br>&lt;translator type=&quot;oracle-override&quot; name=&quot;oracle&quot;&gt; <br>     &lt;property value=&quot;RequiresCriteria&quot; name=&quot;true&quot;/&gt; <br>&lt;/translator&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h5. {color:#000000}{*}Search{*}{color} <br>{code:lang=SQL|title=Search Example} <br>SELECT x.* FROM (call pm1.native(&#39;search;context-name=corporate;filter=(objectClass=*);count-limit=5;timeout=6;search-scope=ONELEVEL_SCOPE;attributes=uid,cn&#39;)) w, <br> ARRAYTABLE(w.tuple COLUMNS &quot;uid&quot; string , &quot;cn&quot; string) AS x <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}from the above code, the &quot;{color}{color:#333333}{*}search{*}{color}{color:#333333}&quot; keyword followed by below properties. Each property must be delimited by semi-colon (\;) If a property contains a semi-colon (\;), it should be escaped by another semi-colon - see also{color}[Parameterizable Native Queries|Built-in Translators#native]&amp;nbsp;and the native-query procedure example above. <br>|| {color:#000000}Name{color} || {color:#000000}Description{color} || {color:#000000}Required{color} || <br>| {color:#333333}context-name{color} | {color:#333333}LDAP Context name{color} | {color:#333333}Yes{color} | <br>| {color:#333333}filter{color} | {color:#333333}query to filter the records in the context{color} | {color:#333333}No{color} | <br>| {color:#333333}count-limit{color} | {color:#333333}limit the number of results. same as using LIMIT{color} | {color:#333333}No{color} | <br>| {color:#333333}timeout{color} | {color:#333333}Time out the query if not finished in given milliseconds{color} | {color:#333333}No{color} | <br>| {color:#333333}search-scope{color} | {color:#333333}LDAP search scope, one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE{color} | {color:#333333}No{color} | <br>| {color:#333333}attributes{color} | {color:#333333}attributes to retrieve{color} | {color:#333333}Yes{color} | <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The above XML fragment is overriding the _oracle_ translator and altering the behavior of _RequiresCriteria_ property to true. Note that the modified translator is only available in the scope of this VDB. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h5. {color:#000000}{*}Delete{*}{color} <br>{code:lang=SQL|title=Delete Example} <br>SELECT x.* FROM (call pm1.native(&#39;delete;uid=doe,ou=people,o=teiid.org&#39;)) w, <br> ARRAYTABLE(w.tuple COLUMNS &quot;updatecount&quot; integer) AS x <br>{code} <br>{color:#333333}form the above code, the &quot;{color}{color:#333333}{*}delete{*}{color}{color:#333333}&quot; keyword followed the &quot;DN&quot; string. All the string contents after the &quot;delete;&quot; used as DN.{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. {anchor:native}Parameterizable Native Queries <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h5. {color:#000000}{*}Create or Update{*}{color} <br>{code:lang=SQL|title=Create Example} <br>SELECT x.* FROM <br> (call pm1.native(&#39;create;uid=doe,ou=people,o=teiid.org;attributes=one,two,three&#39;, &#39;one&#39;, 2, 3.0)) w, <br> ARRAYTABLE(w.tuple COLUMNS &quot;update_count&quot; integer) AS x <br>{code} <br>{color:#333333}form the above code, the &quot;{color}{color:#333333}{*}create{*}{color}{color:#333333}&quot; keyword followed the &quot;DN&quot; string. All the string contents after the &quot;create;&quot; is used as DN. It also takes one property called &quot;attributes&quot; which is comma separated list of attributes. The values for each attribute is specified as separate argument to the &quot;native&quot; procedure.{color} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">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. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{color:#333333}Update is similar to create{color} <br>{code:lang=SQL|title=Update Example} <br>SELECT x.* FROM <br> (call pm1.native(&#39;update;uid=doe,ou=people,o=teiid.org;attributes=one,two,three&#39;, &#39;one&#39;, 2, 3.0)) w, <br> ARRAYTABLE(w.tuple COLUMNS &quot;update_count&quot; integer) AS x <br>{code} <br>{info:tip=Name of the Native Procedure} <br>{color:#333333}By default the name of the procedure that executes the queries directly is called&amp;nbsp;{color}{color:#333333}{*}native{*}{color}{color:#333333}, however user can{color} <br>{color:#333333}set override execution property vdb.xml file to change it.{color}{info} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">For example the native-query &quot;select c from g where c1 = $1 and c2 = &#39;$$1&#39;&quot; results in a JDBC source query of &quot;select c from g where c1 = ? and c2 = &#39;$1&#39;&quot;, where ? will be replaced with the actual value bound to parameter 1. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {color:#000000}{*}JCA Resource Adapter{*}{color} <br> <br>{color:#333333}The resource adapter for this translator provided through &quot;LDAP Data Source&quot;, Refer to Admin Guide for configuration.{color} <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="Built-inTranslators-"></a><font color="#000000"><b>LDAP Translator</b></font></h1>

<p><font color="#333333">The LDAP translator, known by the type name&nbsp;</font><font color="#333333"><em>ldap</em></font><font color="#333333">, exposes an LDAP directory tree relationally with pushdown support for filtering via criteria. This is typically coupled with the LDAP resource adapter.</font></p>

<p><font color="#333333"><b>Execution Properties</b></font><font color="#333333">&nbsp;</font></p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> <font color="#000000">Name</font> </th>
<th class='confluenceTh'> <font color="#000000">Description</font> </th>
<th class='confluenceTh'> <font color="#000000">Default</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">SearchDerfaultBaseDN</font> </td>
<td class='confluenceTd'> <font color="#333333">Default Base DN for LDAP Searches</font> </td>
<td class='confluenceTd'> <font color="#333333">null</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">SearchDefaultScope</font> </td>
<td class='confluenceTd'> <font color="#333333">Default Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE.</font> </td>
<td class='confluenceTd'> <font color="#333333">ONELEVEL_SCOPE</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">RestrictToObjectClass</font> </td>
<td class='confluenceTd'> <font color="#333333">Restrict Searches to objectClass named in the Name field for a table</font> </td>
<td class='confluenceTd'> <font color="#333333">false</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">UsePagination</font> </td>
<td class='confluenceTd'> <font color="#333333">Use a PagedResultsControl to page through large results. This is not supported by all directory servers.</font> </td>
<td class='confluenceTd'> <font color="#333333">false</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">ExceptionOnSizeLimitExceeded</font> </td>
<td class='confluenceTd'> <font color="#333333">Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.</font> </td>
<td class='confluenceTd'> <font color="#333333">false</font> </td>
</tr>
</tbody></table>
</div>

<p><font color="#333333">There are no import settings for the ldap translator; it also does not provide metadata.</font></p>

<h3><a name="Built-inTranslators-"></a><font color="#000000"><b>Metadata Directives</b></font></h3>

<p><font color="#333333">String columns with a default value of "multivalued-concat" will concatinate all attribute values together in alphabetical order using a ? delimiter. If a multivalued attribute does not have a default value of "multivalued-concat", then any value may be returned.</font></p>

<h3><a name="Built-inTranslators-"></a><font color="#000000"><b>Native Queries</b></font></h3>

<p><font color="#333333">LDAP procedures may optionally have native queries associated with them - see&nbsp;</font><a href="#Built-inTranslators-native">Parameterizable Native Queries</a>. The operation prefix (select;, insert;, update;, delete; - see the native procedure logic below for more) must be present in the native-query, but it will not be issued as part of the query to the source.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example DDL for an LDAP native procedure</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
CREATE FOREIGN PROCEDURE proc (arg1 integer, arg2 string) OPTIONS ("teiid_rel:native-query" 'search;context-name=corporate;filter=(&amp;(objectCategory=person)(objectClass=user)(!cn=$2));count-limit=5;timeout=$1;search-scope=ONELEVEL_SCOPE;attributes=uid,cn') returns (col1 string, col2 string);
</pre>
</div></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><font color="#333333">Parameter values have reserved characters escaped, but are otherwise directly substituted into the query.</font></td></tr></table></div>

<h4><a name="Built-inTranslators-"></a><font color="#000000"><b>Native Procedure</b></font></h4>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><font color="#333333">This feature is turned off by default because of the security risk this exposes to execute any command against the source. To enable this feature, override the translator property called "SupportsNativeQueries" to true. Look for&nbsp;</font><a href="#Built-inTranslators-OverrideExecutionProperties">Override Execution Properties</a>&nbsp;above.</td></tr></table></div>
<p><font color="#333333">LDAP translator provides a procedure with name&nbsp;</font><font color="#333333"><b>native</b></font><font color="#333333">&nbsp;that gives ability to execute any ad-hoc native LDAP queries directly against the source without any Teiid parsing or resolving. The metadata of this procedure's execution results are not known to the Teiid, and they are returned as object array. User can use&nbsp;</font><a href="/author/display/TEIID/ARRAYTABLE" title="ARRAYTABLE">ARRAYTABLE</a>&nbsp;construct to build tabular output for consumption by client applications. Since there is no known direct query language for LDAP, Teiid exposes this procedure with a simple query structure as below</p>

<h5><a name="Built-inTranslators-"></a><font color="#000000"><b>Search</b></font></h5>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Search Example</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
SELECT x.* FROM (call pm1.native('search;context-name=corporate;filter=(objectClass=*);count-limit=5;timeout=6;search-scope=ONELEVEL_SCOPE;attributes=uid,cn')) w,
 ARRAYTABLE(w.tuple COLUMNS "uid" string , "cn" string) AS x
</pre>
</div></div>
<p><font color="#333333">from the above code, the "</font><font color="#333333"><b>search</b></font><font color="#333333">" keyword followed by below properties. Each property must be delimited by semi-colon (;) If a property contains a semi-colon (;), it should be escaped by another semi-colon - see also</font><a href="#Built-inTranslators-native">Parameterizable Native Queries</a>&nbsp;and the native-query procedure example above.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> <font color="#000000">Name</font> </th>
<th class='confluenceTh'> <font color="#000000">Description</font> </th>
<th class='confluenceTh'> <font color="#000000">Required</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">context-name</font> </td>
<td class='confluenceTd'> <font color="#333333">LDAP Context name</font> </td>
<td class='confluenceTd'> <font color="#333333">Yes</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">filter</font> </td>
<td class='confluenceTd'> <font color="#333333">query to filter the records in the context</font> </td>
<td class='confluenceTd'> <font color="#333333">No</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">count-limit</font> </td>
<td class='confluenceTd'> <font color="#333333">limit the number of results. same as using LIMIT</font> </td>
<td class='confluenceTd'> <font color="#333333">No</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">timeout</font> </td>
<td class='confluenceTd'> <font color="#333333">Time out the query if not finished in given milliseconds</font> </td>
<td class='confluenceTd'> <font color="#333333">No</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">search-scope</font> </td>
<td class='confluenceTd'> <font color="#333333">LDAP search scope, one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE</font> </td>
<td class='confluenceTd'> <font color="#333333">No</font> </td>
</tr>
<tr>
<td class='confluenceTd'> <font color="#333333">attributes</font> </td>
<td class='confluenceTd'> <font color="#333333">attributes to retrieve</font> </td>
<td class='confluenceTd'> <font color="#333333">Yes</font> </td>
</tr>
</tbody></table>
</div>


<h5><a name="Built-inTranslators-"></a><font color="#000000"><b>Delete</b></font></h5>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Delete Example</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
SELECT x.* FROM (call pm1.native('delete;uid=doe,ou=people,o=teiid.org')) w,
 ARRAYTABLE(w.tuple COLUMNS "updatecount" integer) AS x
</pre>
</div></div>
<p><font color="#333333">form the above code, the "</font><font color="#333333"><b>delete</b></font><font color="#333333">" keyword followed the "DN" string. All the string contents after the "delete;" used as DN.</font></p>

<h5><a name="Built-inTranslators-"></a><font color="#000000"><b>Create or Update</b></font></h5>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Create Example</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
SELECT x.* FROM
 (call pm1.native('create;uid=doe,ou=people,o=teiid.org;attributes=one,two,three', 'one', 2, 3.0)) w,
 ARRAYTABLE(w.tuple COLUMNS "update_count" integer) AS x
</pre>
</div></div>
<p><font color="#333333">form the above code, the "</font><font color="#333333"><b>create</b></font><font color="#333333">" keyword followed the "DN" string. All the string contents after the "create;" is used as DN. It also takes one property called "attributes" which is comma separated list of attributes. The values for each attribute is specified as separate argument to the "native" procedure.</font></p>

<p><font color="#333333">Update is similar to create</font></p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Update Example</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
SELECT x.* FROM
 (call pm1.native('update;uid=doe,ou=people,o=teiid.org;attributes=one,two,three', 'one', 2, 3.0)) w,
 ARRAYTABLE(w.tuple COLUMNS "update_count" integer) AS x
</pre>
</div></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><font color="#333333">By default the name of the procedure that executes the queries directly is called&nbsp;</font><font color="#333333"><b>native</b></font><font color="#333333">, however user can</font><br/>
<font color="#333333">set override execution property vdb.xml file to change it.</font></td></tr></table></div>

<h3><a name="Built-inTranslators-"></a><font color="#000000"><b>JCA Resource Adapter</b></font></h3>

<p><font color="#333333">The resource adapter for this translator provided through "LDAP Data Source", Refer to Admin Guide for configuration.</font></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/Built-in+Translators">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646290&revisedVersion=40&originalVersion=39">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Built-in+Translators?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>