<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/LDAP+Translator">LDAP Translator</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (31)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >h1. LDAP Translator <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>The</span> LDAP translator, known by the type <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">name&amp;nbsp;{color}{color:#333333}{_}ldap{_}{color}{color:#333333},</span> <span class="diff-added-words"style="background-color: #dfd;">name&amp;nbsp;{_}ldap{_},</span> exposes an LDAP directory tree relationally with pushdown support for filtering via criteria. This is typically coupled with the LDAP resource <span class="diff-changed-words">adapter.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <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;">{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></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{*}Execution Properties{*}&amp;nbsp; <br>|| Name || Description || Default || <br>| SearchDerfaultBaseDN | Default Base DN for LDAP Searches | null | <br></td></tr>
            <tr><td class="diff-changed-lines" >| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}SearchDefaultScope{color}</span> <span class="diff-added-words"style="background-color: #dfd;">SearchDefaultScope</span> | <span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Default</span> Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJECT_SCOPE, <span class="diff-changed-words">ONELEVEL_SCOPE.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}ONELEVEL_SCOPE{color}</span> <span class="diff-added-words"style="background-color: #dfd;">ONELEVEL_SCOPE</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" >| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}RestrictToObjectClass{color}</span> <span class="diff-added-words"style="background-color: #dfd;">RestrictToObjectClass</span> | <span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Restrict</span> Searches to objectClass named in the Name field for a <span class="diff-changed-words">table<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}false{color}</span> <span class="diff-added-words"style="background-color: #dfd;">false</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" >| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}UsePagination{color}</span> <span class="diff-added-words"style="background-color: #dfd;">UsePagination</span> | <span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Use</span> a PagedResultsControl to page through large results. This is not supported by all directory <span class="diff-changed-words">servers.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}false{color}</span> <span class="diff-added-words"style="background-color: #dfd;">false</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" >| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}ExceptionOnSizeLimitExceeded{color}</span> <span class="diff-added-words"style="background-color: #dfd;">ExceptionOnSizeLimitExceeded</span> | <span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Set</span> to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly <span class="diff-changed-words">enforced.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}false{color}</span> <span class="diff-added-words"style="background-color: #dfd;">false</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>There</span> are no import settings for the ldap translator; it also does not provide <span class="diff-changed-words">metadata.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Metadata Directives <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>String</span> 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 <span class="diff-changed-words">returned.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Native Queries <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>LDAP</span> procedures may optionally have native queries associated with them - <span class="diff-changed-words">see&amp;nbsp;<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span>[Parameterizable</span> Native Queries|Translators#native]. The operation prefix (select;, insert;, update;, delete; - see <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the native procedure logic</span> 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></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;"> <br></td></tr>
            <tr><td class="diff-unchanged" >{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></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{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;">h4. Native Procedure <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note}Parameter values will have reserved characters escaped, but are otherwise directly substituted into the query.{note} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h4. Direct Query Procedure <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{warning} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{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|Translators#Override Execution Properties]&amp;nbsp;above. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">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 execution property|Translators#Override Execution Properties] called _SupportsDirectQueryProcedure_ to true. <br></td></tr>
            <tr><td class="diff-unchanged" >{warning} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{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-added-lines" style="background-color: #dfd;">{info:tip=Name of the Direct Procedure} <br>By default the name of the procedure that executes the queries directly is *native*.  [Override the execution property|Translators#Override Execution Properties] _DirectQueryProcedureName_ to change it to another name. <br>{info} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The LDAP translator provides a procedure to execute any ad-hoc LDAP query directly against the source without Teiid parsing or resolving. Since the metadata of this procedure&#39;s results are not known to Teiid, they are returned as an object array. [ARRAYTABLE] can be used construct tabular output for consumption by client applications. <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h5. Search <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>from</span> the above code, the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&quot;{color}{color:#333333}{*}search{*}{color}{color:#333333}&quot;</span> <span class="diff-added-words"style="background-color: #dfd;">&quot;{*}search{*}&quot;</span> 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 <span class="diff-changed-words">also<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span>[Parameterizable</span> Native Queries|Translators#native]&amp;nbsp;and the native-query procedure example above. <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">|| {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-added-lines" style="background-color: #dfd;">|| Name || Description || Required || <br>| context-name | LDAP Context name | Yes | <br>| filter | query to filter the records in the context | No | <br>| count-limit | limit the number of results. same as using LIMIT | No | <br>| timeout | Time out the query if not finished in given milliseconds | No | <br>| search-scope | LDAP search scope, one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE | No | <br>| attributes | attributes to retrieve | Yes | <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-unchanged" >h5. Delete <br>{code:lang=SQL|title=Delete Example} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>form</span> the above code, the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&quot;{color}{color:#333333}{*}delete{*}{color}{color:#333333}&quot;</span> <span class="diff-added-words"style="background-color: #dfd;">&quot;{*}delete{*}&quot;</span> keyword followed the &quot;DN&quot; string. All the string contents after the &quot;delete;&quot; used as <span class="diff-changed-words">DN.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h5. Create or Update <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>form</span> the above code, the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&quot;{color}{color:#333333}{*}create{*}{color}{color:#333333}&quot;</span> <span class="diff-added-words"style="background-color: #dfd;">&quot;{*}create{*}&quot;</span> 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; <span class="diff-changed-words">procedure.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <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;">{color:#333333}Update is similar to create{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Update is similar to create <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code:lang=SQL|title=Update Example} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{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 than can{color} {color:#333333}be set via an override execution property in the vdb.xml file.{color}{info} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {*}JCA Resource Adapter{*} <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. {color:#000000}{*}JCA Resource Adapter{*}{color} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>The</span> resource adapter for this translator provided through &quot;LDAP Data Source&quot;, Refer to Admin Guide for <span class="diff-changed-words">configuration.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="LDAPTranslator-LDAPTranslator"></a>LDAP Translator</h1>

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

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

<p>There are no import settings for the ldap translator; it also does not provide metadata.</p>

<h3><a name="LDAPTranslator-MetadataDirectives"></a>Metadata Directives</h3>

<p>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.</p>

<h3><a name="LDAPTranslator-NativeQueries"></a>Native Queries</h3>

<p>LDAP procedures may optionally have native queries associated with them - see&nbsp;<a href="/author/display/TEIID/Translators#Translators-native">Parameterizable Native Queries</a>. The operation prefix (select;, insert;, update;, delete; - see 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>Parameter values will have reserved characters escaped, but are otherwise directly substituted into the query.</td></tr></table></div>

<h4><a name="LDAPTranslator-DirectQueryProcedure"></a>Direct Query Procedure</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>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, <a href="/author/display/TEIID/Translators#Translators-OverrideExecutionProperties">override the execution property</a> called <em>SupportsDirectQueryProcedure</em> to true.</td></tr></table></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>By default the name of the procedure that executes the queries directly is <b>native</b>.  <a href="/author/display/TEIID/Translators#Translators-OverrideExecutionProperties">Override the execution property</a> <em>DirectQueryProcedureName</em> to change it to another name.</td></tr></table></div>

<p>The LDAP translator provides a procedure to execute any ad-hoc LDAP query directly against the source without Teiid parsing or resolving. Since the metadata of this procedure's results are not known to Teiid, they are returned as an object array. <a href="/author/display/TEIID/ARRAYTABLE" title="ARRAYTABLE">ARRAYTABLE</a> can be used construct tabular output for consumption by client applications.</p>

<h5><a name="LDAPTranslator-Search"></a>Search</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>from the above code, the "<b>search</b>" 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<a href="/author/display/TEIID/Translators#Translators-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'> Name </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Required </th>
</tr>
<tr>
<td class='confluenceTd'> context-name </td>
<td class='confluenceTd'> LDAP Context name </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> filter </td>
<td class='confluenceTd'> query to filter the records in the context </td>
<td class='confluenceTd'> No </td>
</tr>
<tr>
<td class='confluenceTd'> count-limit </td>
<td class='confluenceTd'> limit the number of results. same as using LIMIT </td>
<td class='confluenceTd'> No </td>
</tr>
<tr>
<td class='confluenceTd'> timeout </td>
<td class='confluenceTd'> Time out the query if not finished in given milliseconds </td>
<td class='confluenceTd'> No </td>
</tr>
<tr>
<td class='confluenceTd'> search-scope </td>
<td class='confluenceTd'> LDAP search scope, one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE </td>
<td class='confluenceTd'> No </td>
</tr>
<tr>
<td class='confluenceTd'> attributes </td>
<td class='confluenceTd'> attributes to retrieve </td>
<td class='confluenceTd'> Yes </td>
</tr>
</tbody></table>
</div>


<h5><a name="LDAPTranslator-Delete"></a>Delete</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>form the above code, the "<b>delete</b>" keyword followed the "DN" string. All the string contents after the "delete;" used as DN.</p>

<h5><a name="LDAPTranslator-CreateorUpdate"></a>Create or Update</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>form the above code, the "<b>create</b>" 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.</p>

<p>Update is similar to create</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>

<h3><a name="LDAPTranslator-%7B%7DJCAResourceAdapter%7B%7D"></a><b>JCA Resource Adapter</b></h3>

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