From teiid-commits at lists.jboss.org Wed Sep 15 11:02:00 2010 Content-Type: multipart/mixed; boundary="===============0889744811073655073==" MIME-Version: 1.0 From: teiid-commits at lists.jboss.org To: teiid-commits at lists.jboss.org Subject: [teiid-commits] teiid SVN: r2576 - branches/7.1.x/documentation/reference/src/main/docbook/en-US/content. Date: Wed, 15 Sep 2010 11:02:00 -0400 Message-ID: <201009151502.o8FF20Ti008417@svn01.web.mwc.hst.phx2.redhat.com> --===============0889744811073655073== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: shawkins Date: 2010-09-15 11:01:59 -0400 (Wed, 15 Sep 2010) New Revision: 2576 Modified: branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/tr= anslators.xml Log: TEIID-1258 applying formatting patch Modified: branches/7.1.x/documentation/reference/src/main/docbook/en-US/con= tent/translators.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/t= ranslators.xml 2010-09-14 21:21:26 UTC (rev 2575) +++ branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/t= ranslators.xml 2010-09-15 15:01:59 UTC (rev 2576) @@ -1,568 +1,779 @@ -Translators -
-Introduction to the Teiid Connector Architecture -The TCA (Teiid Connector Architecture) 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 metadat= a as to what SQL constructs are supported for pushdown and the ability to i= mport metadata from the external system. ->A Translator is the heart of the TCA and acts as the bridge logic b= etween Teiid and an external system, which is most commonly accessed throug= h a JCA resource adapter. See the Teiid Developers Guide for details on de= veloping custom Translators and JCA resource adapters for use with Teiid. - -The TCA is not the same as the JCA, the JavaEE Connector Architectur= e, although the TCA is designed for use with JCA resource adapters. - - -The import capabilities of Teiid Translators is currently only used = in dynamic VDBs and not by the Teiid = Designer. - -
-
-Translators -A Translator is typically paired with a particular JCA resource adap= ter. In instances where pooling, environment dependent configuration manag= ement, advanced security handling, etc. are not needed, then a JCA resource= adapter is not needed. The configuration of JCA ConnectionFactories for n= eeded resource adapters is not part of this guide, please see the Teiid Adm= in Guide and the kit examples for configuring resource adapters for use in = JBossAS. -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 f= or import. -The execution properties for a translator typically have reasonable = defaults. For specific translator types, e.g. the Derby translator, base e= xecution properties are already tuned to match the source. In most cases t= he user will not need to adjust their values. - -Base Execution Properties - shared by all translators - - - - - - -Name -Description -Default - - - - -Immutable -Set to true to indicate that the source never changes. -false - - -RequiresCriteria -Set to true to indicate that source SELECT/UPDATE/DELETE queries re= quire a where clause. -false - - -SupportsOrderBy -Set to true to indicate that the ORDER BY clause is supported. -false - - -SupportsOuterJoins -Set to true to indicate that OUTER JOINs are supported. -false - - -SupportsFullOuterJoins -If outer joins are supported, true indicates that FULL OUTER JOINs = are supported. -false - - -SupportsInnerJoins -Set to true to indicate that INNER JOINs are supported. -false - - -SupportedJoinCriteria -If joins are supported, defines what criteria may be used as the jo= in criteria. May be one of (ANY, THETA, EQUI, or KEY). -ANY - - - -
- -Only a subset of the metadata as to what SQL constructs the source s= upports can be set through execution properties. If more control is needed= , please consult the Teiid Developers Guide. - -There are no base importer settings. -
-File Translator -The file translator, known by the type name file, exposes stored procedures to leverage file system resources exposed by t= he file resource adapter. = -It will commonly be used with the TEXTTABLE or XMLTABLE table functions to use C= SV or XML formated data. - -Execution Properties - - - -Name -Description -Default - - - - -Encoding -The encoding that should be used for CLOBs returned by the getTextF= iles procedure -The system default encoding - - - -
-There are file importer settings, but it does provide metadata for d= ynamic vdbs. -
Usage -Retrieve all files as BLOBs with the given extension at the given pa= th. call getFiles('path/*.ext') -If the extension pattern is not specified and the path is a directory, the= n all files in the directory will be returned. If the path or filename doe= sn't exist, then no results will be returned. - -Retrieve all files as CLOBs with the given extension at the given pa= th. call getTextFiles('path/*.ext') -Save the CLOB, BLOB, or XML file to given path call = saveFile('path', value) -See the database metadata for full descriptions of the getFiles, get= TextFiles, and saveFile procedures. -
-
-
-JDBC Translator -The JDBC translator bridges between SQL semantic and data type diffe= rence between Teiid and a target RDBMS. Teiid has a range of specific tran= slators that target the most popular open source and proprietary databases.= - -Type names - -jdbc-ansi - declares support for most SQL const= ructs supported by Teiid, except for row limit/offset and EXCEPT/INTERCECT.= Translates source SQL into ANSI compliant syntax. This translator should= be used when another more specific type is not available. - - -jdbc-simple - same as jdbc-ansi, except disable= s support for function, UNION, and aggregate pushdown. - - -db2 - for use with DB2 8 or later. - - -derby - for use with Derby 10.1 or later. - - -h2 - for use with H2 version 1.1 or later. - - -hsql - for use with HSQLDB 1.7 or later. - - -informix - for use with any version. - - -metamatrix - for use with MetaMatrix 5.5.0 or l= ater. - - -mysql/mysql5 - for use wit= h MySQL version 4.x and 5 or later respectively. The MySQL Tra= nslators expect the database or session to be using ANSI mode. If the data= base is not using ANSI mode, an initialization query should be used on the = pool to set ANSI mode: set SESSION sql_mode =3D 'ANSI' - - -oracle - for use with Oracle 9i or later. Sequ= ences may be used with the Oracle translator. = -A sequence may be modeled as a table with a name in source of DUAL and col= umns with the name in source set to <sequencesequence name>.[nextval|= currentval]. = -You can use a sequence as the default value for insert columns by setting = the column to autoincrement and the name in source to <element name>:= SEQUENCE=3D<sequence name>.<sequence value>. - - -postgresql - for use with 8.0 or later clients = and 7.1 or later server. - - -sybase - for use with Sybase version 12.5 or la= ter. - - -teiid - for use with Teiid 6.0 or later. - - -teradata - for use with Teradata V2R5.1 or late= r. - - - -Execution Properties - shared by all JDBC Translators - - - - - - -Name -Description -Default - - - - -DatabaseTimeZone -The time zone of the database. Used when fetchings date, time, or = timestamp values. -The system default time zone - - -DatabaseVersion -The specific database version. Used to further tune pushdown suppo= rt. -The base supported version - - -TrimStrings -true to trim trailing whitespace from fixed length character string= s. Note that Teiid only has a string, or varchar, type that treats trailin= g whitespace as meaningful. -false - - -UseBindVariables -true to indicate that PreparedStatements should be used and that li= teral values in the source query should be replace with bind variables. If= false only LOB values will trigger the use of PreparedStatements. -true - - -UseCommentsInSourceQuery -This will embed a /*comment*/ leading comment with session/request = id in source SQL query for informational purposes -false - - -MaxPreparedInsertBatchSize -The max size of a prepared insert batch. -2048 - - - -
- -Importer Properties - shared by all JDBC Translators - - - - - - -Name -Description -Default - - - - -catalog -See DatabaseMetaData.getTablesFull JavaDoc for DatabaseMetaData -null - - -schemaPattern -See DatabaseMetaData.getTables -null - - -tableNamePattern -See DatabaseMetaData.getTables -null - - -procedurePatternName -See DatabaseMetaData.getProcedures -null - - -tableTypes -Comma separated list - without spaces - of imported table types. S= ee DatabaseMetaData.getTables -null - - -useFullSchemaName -When false, directs the importer to drop the source catalog/schema = from the Teiid object name, so that the Teiid fully qualified name will be = in the form of <model name>.<table name> - Note: that this may = lead to objects with duplicate names when importing from multiple schemas, = which results in an exception -true - - -importKeys -true to import primary and foriegn keys -true - - -importIndexes -true to import index/unique key/cardinality information -true - - -importApproximateIndexes -true to import approximate index information. See DatabaseMetaData= .getIndexInfo -true - - -importProcedures -true to import procedures and procedure columns - Note that it is n= ot always possible to import procedure result set columns due to database l= imitations. It is also not currently possible to import overloaded procedu= res. -true - - -widenUnsignedTypes -true to convert unsigned types to the next widest type. For exampl= e SQL Server reports tinyint as an unsigned type. With this option enabled= , tinyint would be imported as a short instead of a byte. -true - - -quoteNameInSource -false will override the default and direct Teiid to create source q= ueries using unquoted identifiers. -true - - - -
- -The default import settings will crawl all available metadata. This= import process is time consuming and full metadata import is not needed in= most situations. Most commonly you'll want to limit import by schemaPatte= rn and tableTypes. -Example importer settings to only import tables and views from my-sc= hema. - -...]]> -
Usage -Usage of a JDBC source is straight-forward. Using Teiid SQL, the so= urce ma be queried as if the tables and procedures were local to the Teiid = system. - -
-
-
-LDAP Translator -The LDAP translator, known by the type name ldap, exposes an LDAP directory tree relationally with pusdown support for fil= tering via criteria. This is typically coupled with the LDAP resource adap= ter. - -Execution Properties - - - -Name -Description -Default - - - - -SearchDerfaultBaseDN -Default Base DN for LDAP Searches -null - - -SearchDefaultScope -Default Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJEC= T_SCOPE, ONELEVEL_SCOPE. -ONELEVEL_SCOPE - - -RestrictToObjectClass -Restrict Searches to objectClass named in the Name field for a tabl= e -false - - - -
-
-
-Loopback Translator -The Loopback translator, known by the type name loopback, provides a quick testing solution. It supports all SQL construc= ts and returns default results, with configurable behavior. - -Execution Properties - - - - - - -Name -Description -Default - - - - -ThrowError -true to always throw an error -false - - -RowCount -Rows returned for non-update queries. -1 - - -WaitTime -Wait randomly up to this number of milliseconds with each sourc que= ry. -0 - - -PollIntervalInMilli -if positive results will be "asynchronusly" returned - that is a Da= taNotAvailableException will be thrown initially and the engine will wait t= he poll interval before polling for the results. --1 - - - -
-There are no import settings for the Loopback translator; it also do= es not provide metadata - it should be used as a testing stub. -
-
-Salesforce Translator -The Salesforce translator, known by the type name salesfor= ce supports the SELECT, DELETE, INSERT and UPDATE operations aga= inst a Salesforce.com account. It is designed for use with the Teiid Sales= force resource adapter. - -Execution Properties - - - - - - -Name -Description -Default - - - - -ModelAuditFeilds -Audit Model Fields -false - - - -
-The Salesforce translator can import metadata, but does not currentl= y have import settings. -
-Usage -
-SQL Processing -Salesforce does not provide the same set of - functionality as a relational database. For example, Salesforce does - not support arbitrary joins between tables. However, working in - combination with the Teiid Query Planner, the Salesforce - connector - supports nearly all of the SQL syntax supported by the - Teiid. + Translators + +
+ Introduction to the Teiid Connector Architecture + + The Teiid Connector Architecture (TCA) provides Teiid with a robus= t mechanism = + for integrating with external systems. The TCA defines a common c= lient interface = + between Teiid and an external system that includes metadata as to = what SQL = + constructs are supported for pushdown and the ability to import me= tadata from = + the external system. - The Salesforce Connector executes SQL commands by =E2=80=9Cp= ushing - down=E2=80=9D the command to Salesforce whenever possible, based on the - supported capabilities. Teiid will automatically provide - additional database functionality when the Salesforce Connector does - not explicitly provide support for a given SQL construct. In these - cases, the SQL construct cannot be =E2=80=9Cpushed down=E2=80=9D to the= data source, - so it will be evaluated in Teiid, in order to ensure that the - operation is performed. + = + + 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 devel= oping custom = + Translators and JCA resource adapters for use with Teiid. - In cases where certain SQL capabilities cannot be pushed down - to Salesforce, Teiid will push down the capabilities that are - supported, and fetch a set of data from Salesforce. Then, Teiid - will evaluate the additional capabilities, creating a subset of the - original data set. Finally, Teiid will pass the result to the - client. - + = + + + The TCA is not the same as the JCA, the JavaEE Connector Archi= tecture, although = + the TCA is designed for use with JCA resource adapters. + + + = + + + The import capabilities of Teiid Translators is currently only= used in = + dynamic VDBs and not by = the Teiid Designer. + + + = +
= - - Neither Salesforce nor the Salesforce Connector support - the sum() scalar function, but they do support CompareCriteriaEquals, - so the query that is passed to Salesforce by the connector will be - transformed to this query. +
+ Translators + + A Translator is typically paired with a particular JCA resource ad= apter. In = + instances where pooling, environment dependent configuration manag= ement, advanced = + security handling, etc. are not needed, then a JCA resource adapte= r is not needed. = + The configuration of JCA ConnectionFactories for needed resource a= dapters is not = + part of this guide, please see the Teiid Administrator Guide and t= he kit examples = + for configuring resource adapters for use in JBossAS. - - The sum() scalar function will be applied by the Teiid - Query Engine to the result set returned by the connector. + = + + Translators can have a number of configurable properties. These a= re broken down = + into execution properties, which determine aspects of how data is = retrieved, and = + import settings, which determine what metadata is read for import. - In some cases multiple calls to the Salesforce application - will be made to support the SQL passed to the connector. - - - The API in Salesforce to delete objects only supports - deleting by ID. In order to accomplish this the Salesforce connector - will first execute a query to get the IDs of the correct objects, and - then delete those objects. So the above DELETE command will result in - the following two commands. - - );*]]> - *The Salesforce API DELETE call is not expressed in SQL, but - the above is an SQL equivalent expression. - - It's useful to be aware of unsupported capabilities, in - order - to avoid fetching large data sets from Salesforce and making you - queries as performant as possible. See all Supported Capabilities. - -
-
- Selecting from Multi-Select Picklists + = - A multi-select picklist is a field type in Salesforce that can - contain multiple values in a single field. Query criteria operators - for fields of this type in SOQL are limited to EQ, NE, includes and - excludes. The full Salesforce documentation for selecting from - mullti-select picklists can be found at the following link. - Querying Mulit-select Picklists - + The execution properties for a translator typically have reasonabl= e defaults. For = + specific translator types, e.g. the Derby translator, base executi= on properties are = + already tuned to match the source. In most cases the user will no= t need to adjust = + their values. - Teiid SQL does not support the includes or - excludes operators, but the Salesforce connector provides user - defined function definitions for these operators that provided - equivalent functionality for fields of type multi-select. The - definition for the functions is: - - - For example, take a single multi-select picklist column - called Status that contains all of these values. - - - + + + Base Execution Properties - shared by all translators</= title> + <tgroup cols=3D"3"> + <colspec colwidth=3D"3*" /> + <colspec colwidth=3D"6*" /> + <colspec colwidth=3D"2*" /> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + <entry>Default</entry> + </row> + </thead> + <tbody> + <row> + <entry>Immutable</entry> + <entry>Set to true to indicate that the source nev= er changes.</entry> + <entry>false</entry> + </row> + <row> + <entry>RequiresCriteria</entry> + <entry>Set to true to indicate that source SELECT/= UPDATE/DELETE queries require a where clause.</entry> + <entry>false</entry> + </row> + <row> + <entry>SupportsOrderBy</entry> + <entry>Set to true to indicate that the ORDER BY c= lause is supported.</entry> + <entry>false</entry> + </row> + <row> + <entry>SupportsOuterJoins</entry> + <entry>Set to true to indicate that OUTER JOINs ar= e supported.</entry> + <entry>false</entry> + </row> + <row> + <entry>SupportsFullOuterJoins</entry> + <entry>If outer joins are supported, true indicate= s that FULL OUTER JOINs are supported.</entry> + <entry>false</entry> + </row> + <row> + <entry>SupportsInnerJoins</entry> + <entry>Set to true to indicate that INNER JOINs ar= e supported.</entry> + <entry>false</entry> + </row> + <row> + <entry>SupportedJoinCriteria</entry> + <entry>If joins are supported, defines what criter= ia may be used as the join criteria. May be one of (ANY, THETA, EQUI, or K= EY).</entry> + <entry>ANY</entry> + </row> + </tbody> + </tgroup> + </table> + = + <note> + <para> + Only a subset of the metadata as to what SQL constructs the so= urce supports = + can be set through execution properties. If more control is n= eeded, please = + consult the Teiid Developers Guide. + </para> + </note> + = + <para>There are no base importer settings.</para> + + <section> + <title>File Translator + + The file translator, known by the type name file, exposes = + stored procedures to leverage file system resources exposed by= the file resource = + adapter. It will commonly be used with the TEXTTABLE = + or XMLTABLE table functions = to use CSV or XML = + formated data. + + +
+ Execution Properties + + + + + + + Name + Description + Default + + + + + Encoding + The encoding that should be used for CL= OBs returned by the getTextFiles procedure + The system default encoding + + + +
+ = + There are file importer settings, but it does provide me= tadata for dynamic vdbs. + = +
+ Usage - current + Retrieve all files as BLOBs with the given extension at th= e given path. - - + = + call getFiles('path/*.ext') + = - working + If the extension pattern is not specified and the path is = a directory, = + then all files in the directory will be returned. If the = path or filename = + doesn't exist, then no results will be returned. - - + = - critical + Retrieve all files as CLOBs with the given extension at th= e given path. - - - For that column, all of the below are valid queries: - - EQ and NE criteria will pass to Salesforce as supplied. For - example, these queries will not be modified by the connector. + call getTextFiles('path/*.ext') + = + + Save the CLOB, BLOB, or XML file to given path + + call saveFile('path', value) + = + + See the database metadata for full descriptions of the get= Files, = + getTextFiles, and saveFile procedures. + +
+ +
+ = +
+ JDBC Translator + + The JDBC translator bridges between SQL semantic and data type= difference = + between Teiid and a target RDBMS. Teiid has a range of specif= ic translators = + that target the most popular open source and proprietary datab= ases. + + + + Type names: + + + jdbc-ansi - declares support for = most SQL = + constructs supported by Teiid, except for row limit/of= fset and = + EXCEPT/INTERCECT. Translates source SQL into ANSI com= pliant syntax. = + This translator should be used when another more speci= fic type is = + not available. + + + + + jdbc-simple - same as jdbc-ansi, = except disables = + support for function, UNION, and aggregate pushdown. + + + + + db2 - for use with DB2 8 or later. + + + + + derby - for use with Derby 10.1 o= r later. + + + + + h2 - for use with H2 version 1.1 = or later. + + + + + hsql - for use with HSQLDB 1.7 or= later. + + + + + informix - for use with any versi= on. + + + + + metamatrix - for use with MetaMat= rix 5.5.0 or later. + + + + + mysql/mysql5= - for use with = + MySQL version 4.x and 5 or later respectively. = + + + The MySQL Translators expect the database or session t= o be using ANSI = + mode. If the database is not using ANSI mode, an init= ialization query = + should be used on the pool to set ANSI mode: = + + set SESSION sql_mode =3D 'ANSI' + + + + oracle - for use with Oracle 9i o= r later. = + Sequences may be used with the Oracle translator. A se= quence may be = + modeled as a table with a name in source of DUAL and c= olumns with the = + name in source set to <sequencesequence name&= gt;.[nextval|currentval]. = + You can use a sequence as the default value for insert= columns by = + setting the column to autoincrement and the name in so= urce to = + <element name>:SEQUENCE=3D<sequence nam= e>.<sequence value>. + + + + + postgresql - for use with 8.0 or = later clients = + and 7.1 or later server. + + + + + sybase - for use with Sybase vers= ion 12.5 or later. + + + + + teiid - for use with Teiid 6.0 or= later. + + + + + teradata - for use with Teradata = V2R5.1 or later. + + + + = + + Execution Properties - shared by all JDBC Translato= rs + + + + + + + Name + Description + Default + + + + + DatabaseTimeZone + The time zone of the database. Used when f= etchings date, time, or timestamp values. + The system default time zone + + + DatabaseVersion + The specific database version. Used to fur= ther tune pushdown support. + The base supported version + + + TrimStrings + true to trim trailing whitespace from fixed= length character strings. Note that Teiid only has a string, or varchar, = type that treats trailing whitespace as meaningful. + false + + + UseBindVariables + true to indicate that PreparedStatements sh= ould be used and that literal values in the source query should be replace = with bind variables. If false only LOB values will trigger the use of Prep= aredStatements. + true + + + UseCommentsInSourceQuery + This will embed a /*comment*/ leading comme= nt with session/request id in source SQL query for informational purposes + false + + + MaxPreparedInsertBatchSize + The max size of a prepared insert batch. + 2048 + + + +
+ = + + Importer Properties - shared by all JDBC Translators</t= itle> + <tgroup cols=3D"3"> + <colspec colwidth=3D"3*" /> + <colspec colwidth=3D"6*" /> + <colspec colwidth=3D"2*" /> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + <entry>Default</entry> + </row> + </thead> + <tbody> + <row> + <entry>catalog</entry> + <entry>See DatabaseMetaData.getTables<footnote lab= el=3D"1" id=3D"dbmd"><para>Full JavaDoc for <ulink url=3D"http://java.sun.c= om/javase/6/docs/api/java/sql/DatabaseMetaData.html">DatabaseMetaData</ulin= k></para></footnote></entry> + <entry>null</entry> + </row> + <row> + <entry>schemaPattern</entry> + <entry>See DatabaseMetaData.getTables<footnoteref = linkend=3D"dbmd"/></entry> + <entry>null</entry> + </row> + <row> + <entry>tableNamePattern</entry> + <entry>See DatabaseMetaData.getTables<footnoteref = linkend=3D"dbmd"/></entry> + <entry>null</entry> + </row> + <row> + <entry>procedurePatternName</entry> + <entry>See DatabaseMetaData.getProcedures<footnote= ref linkend=3D"dbmd"/></entry> + <entry>null</entry> + </row> + <row> + <entry>tableTypes</entry> + <entry>Comma separated list - without spaces - of = imported table types. See DatabaseMetaData.getTables<footnoteref linkend= =3D"dbmd"/></entry> + <entry>null</entry> + </row> + <row> + <entry>useFullSchemaName</entry> + <entry>When false, directs the importer to drop th= e source catalog/schema from the Teiid object name, so that the Teiid fully= qualified name will be in the form of <model name>.<table name>= ; - Note: that this may lead to objects with duplicate names when importing= from multiple schemas, which results in an exception</entry> + <entry>true</entry> + </row> + <row> + <entry>importKeys</entry> + <entry>true to import primary and foriegn keys</en= try> + <entry>true</entry> + </row> + <row> + <entry>importIndexes</entry> + <entry>true to import index/unique key/cardinality= information</entry> + <entry>true</entry> + </row> + <row> + <entry>importApproximateIndexes</entry> + <entry>true to import approximate index informatio= n. See DatabaseMetaData.getIndexInfo<footnoteref linkend=3D"dbmd"/></entry> + <entry>true</entry> + </row> + <row> + <entry>importProcedures</entry> + <entry>true to import procedures and procedure col= umns - Note that it is not always possible to import procedure result set c= olumns due to database limitations. It is also not currently possible to i= mport overloaded procedures.</entry> + <entry>true</entry> + </row> + <row> + <entry>widenUnsignedTypes</entry> + <entry>true to convert unsigned types to the next = widest type. For example SQL Server reports tinyint as an unsigned type. = With this option enabled, tinyint would be imported as a short instead of a= byte.</entry> + <entry>true</entry> + </row> + <row> + <entry>quoteNameInSource</entry> + <entry>false will override the default and direct = Teiid to create source queries using unquoted identifiers.</entry> + <entry>true</entry> + </row> + </tbody> + </tgroup> + </table> + + <warning> + <para> + The default import settings will crawl all available metadata.= This import = + process is time consuming and full metadata import is not need= ed in most = + situations. Most commonly you'll want to limit import by sche= maPattern = + and tableTypes. + </para> + </warning> + + <para> + Example importer settings to only import tables and views from my-= schema. </para> - <programlisting><![CDATA[SELECT * FROM Issue WHERE Status =3D 'cur= rent'; -SELECT * FROM Issue WHERE Status =3D 'current;critical'; -SELECT * FROM Issue WHERE Status !=3D 'current;working';]]></programlistin= g> - </section> + <programlisting language=3D"XML" role=3D"XML"><![CDATA[... +<property name=3D"importer.tableTypes" value=3D"TABLE,VIEW"/> +<property name=3D"importer.schemaPattern" value=3D"my-schema"/> +...]]></programlisting> + + <section> + <title>Usage + + Usage of a JDBC source is straight-forward. Using Teiid SQL, = the source may be = + queried as if the tables and procedures were local to the Teii= d system. + + + = + + =
- Selecting All Objects + LDAP Translator - The Salesforce connector supports the calling the queryAll operation - from the Salesforce API. The queryAll operation is equivalent - to the query operation with the exception that it returns data about - all current and deleted - objects in the system. + The LDAP translator, known by the type name ldap, exposes an = + LDAP directory tree relationally with pushdown support for filteri= ng via criteria. = + This is typically coupled with the LDAP resource adapter. - The connector determines if it will call the - query or queryAll operation via reference to the - isDeleted property present on each Salesforce object, = - and modeled as a column on each table generated by - the importer. By default this value is set to - False when the model is generated and thus the connector calls - query. Users are free to change the value in the model to True, - changing the default behavior of the connector to be queryAll. + = +
+ Execution Properties + + + + Name + Description + Default + + + + + SearchDerfaultBaseDN + Default Base DN for LDAP Searches + null + + + SearchDefaultScope + Default Scope for LDAP Searches. Can be one= of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE. + ONELEVEL_SCOPE + + + RestrictToObjectClass + Restrict Searches to objectClass named in t= he Name field for a table + false + + + +
+
+ +
+ Loopback Translator + + The Loopback translator, known by the type name loopback= , = + provides a quick testing solution. It supports all SQL constructs= and returns = + default results, with configurable behavior. - The behavior is different if isDeleted is used as a parameter - in the query. If the isDeleted column is used as a parameter - in the query, and the value is 'true' the connector will call queryAll. + = + + Execution Properties + + + + + + + Name + Description + Default + + + + + ThrowError + true to always throw an error + false + + + RowCount + Rows returned for non-update queries. + 1 + + + WaitTime + Wait randomly up to this number of millisec= onds with each sourc query. + 0 + + + PollIntervalInMilli + if positive results will be "asynchronously= " returned - that is a DataNotAvailableException will be thrown initially a= nd the engine will wait the poll interval before polling for the results. + -1 + + + +
+ + + There are no import settings for the Loopback translator; it also = does not = + provide metadata - it should be used as a testing stub. - - If the isDeleted column is used as a parameter in the query, - and the value is 'false' the connector perform the default behavior - will call query. - - - + =
+ =
- Selecting Updated Objects - If the option is selected when importing metadata from - Salesforce, a GetUpdated procedure is generated in the model with - the following sturcture: + Salesforce Translator + + The Salesforce translator, known by the type name salesf= orce = + supports the SELECT, DELETE, INSERT and UPDATE operations against = a Salesforce.com = + account. It is designed for use with the Teiid Salesforce resourc= e adapter. - + Execution Properties + + + + + + + Name + Description + Default + + + + + ModelAuditFeilds + Audit Model Fields + false + + + + + + + The Salesforce translator can import metadata, but does not curren= tly = + have import settings. + + = +
+ Usage +
+ SQL Processing + + Salesforce does not provide the same set of + functionality as a relational database. For example, S= alesforce does + not support arbitrary joins between tables. However, w= orking in + combination with the Teiid Query Planner, the Salesfor= ce + connector supports nearly all of the SQL syntax suppor= ted by the + Teiid. + + + The Salesforce Connector executes SQL commands by =E2= =80=9Cpushing + down=E2=80=9D the command to Salesforce whenever possi= ble, based on the + supported capabilities. Teiid will automatically provi= de + additional database functionality when the Salesforce = Connector does + not explicitly provide support for a given SQL constru= ct. In these + cases, the SQL construct cannot be =E2=80=9Cpushed dow= n=E2=80=9D to the data source, + so it will be evaluated in Teiid, in order to ensure t= hat the + operation is performed. + + + In cases where certain SQL capabilities cannot be push= ed down + to Salesforce, Teiid will push down the capabilities t= hat are + supported, and fetch a set of data from Salesforce. Th= en, Teiid + will evaluate the additional capabilities, creating a = subset of the + original data set. Finally, Teiid will pass the result= to the + client. + + = + + = + + Neither Salesforce nor the Salesforce Connector support + the sum() scalar function, but they do support Compare= CriteriaEquals, + so the query that is passed to Salesforce by the conne= ctor will be + transformed to this query. + + = + + = + + The sum() scalar function will be applied by the Teiid= Query Engine to = + the result set returned by the connector. + + = + + In some cases multiple calls to the Salesforce applica= tion + will be made to support the SQL passed to the connecto= r. + + = + + = + + The API in Salesforce to delete objects only supports + deleting by ID. In order to accomplish this the Salesf= orce connector + will first execute a query to get the IDs of the corre= ct objects, and + then delete those objects. So the above DELETE command= will result in + the following two commands. + + = + );]]> + + + *The Salesforce API DELETE call is not expressed in SQ= L, but + the above is an SQL equivalent expression. + + = + + It's useful to be aware of unsupported capabilities, i= n order + to avoid fetching large data sets from Salesforce and = making you + queries as performant as possible. = + See all Supported Capab= ilities. + + = +
+ = +
+ Selecting from Multi-Select Picklists + + A multi-select picklist is a field type in Salesforce = that can + contain multiple values in a single field. Query crite= ria operators + for fields of this type in SOQL are limited to EQ, NE,= includes and + excludes. The full Salesforce documentation for select= ing from + mullti-select picklists can be found at the following = link. + Querying Mulit-select Pickl= ists + + = + + Teiid SQL does not support the includes or + excludes operators, but the Salesforce connector provi= des user + defined function definitions for these operators that = provided + equivalent functionality for fields of type multi-sele= ct. The + definition for the functions is: + + = + boolean includes(Column column, String= param) +boolean excludes(Column column, String param) + + + For example, take a single multi-select picklist column + called Status that contains all of these values. + + = + + + current + + + working + + + critical + + + = + + For that column, all of the below are valid queries: + + = + + + + EQ and NE criteria will pass to Salesforce as supplied= . For + example, these queries will not be modified by the con= nector. + + = + + +
+
+ Selecting All Objects + + The Salesforce connector supports the calling the quer= yAll operation + from the Salesforce API. The queryAll operation is equ= ivalent + to the query operation with the exception that it retu= rns data about + all current and deleted + objects in the system. + + + The connector determines if it will call the + query or queryAll operation via reference to the + isDeleted property present on each Salesforce object, = + and modeled as a column on each table generated by + the importer. By default this value is set to + False when the model is generated and thus the connect= or calls + query. Users are free to change the value in the model= to True, + changing the default behavior of the connector to be q= ueryAll. + + + The behavior is different if isDeleted is used as a pa= rameter + in the query. If the isDeleted column is used as a par= ameter + in the query, and the value is 'true' the connector wi= ll call queryAll. + + = + + = + + If the isDeleted column is used as a parameter in the = query, + and the value is 'false' the connector perform the def= ault behavior + will call query. + + = + +
+
+ Selecting Updated Objects + + If the option is selected when importing metadata from + Salesforce, a GetUpdated procedure is generated in the= model with + the following structure: + + = + - - See the description of the - GetUpdated - - operation in the Salesforce documentation for usage details. - -
-
- Selecting Deleted Objects - If the option is selected when importing metadata from - Salesforce, a GetDeleted procedure is generated in the model with - the following sturcture: - - + See the description of the + GetUpdated + operation in the Salesforce documentation for usage de= tails. + + = +
+
+ Selecting Deleted Objects + + If the option is selected when importing metadata from + Salesforce, a GetDeleted procedure is generated in the= model with + the following structure: + + = + - - See the description of the - GetDeleted - - operation in the Salesforce documentation for usage details. - -
-
- Relationship Queries - Salesforce does not support joins like a relational database= , = - but it does have support for queries that include parent-to-child - or child-to-parent relationships between objects. These are terme= d = - Relationship Queries. The SalesForce connector supports Relations= hip = - Queries through Outer Join syntax. - - + See the description of the + GetDeleted + operation in the Salesforce documentation for usage de= tails. + + = +
+
+ Relationship Queries + + Salesforce does not support joins like a relational da= tabase, = + but it does have support for queries that include pare= nt-to-child + or child-to-parent relationships between objects. The= se are termed = + Relationship Queries. The SalesForce connector suppor= ts Relationship = + Queries through Outer Join syntax. + + = + - This query shows the correct syntax to query a SalesForce mo= del with = - to produce a relationship query from child to parent. It resolves= to the = - following query to SalesForce. - - - - + This query shows the correct syntax to query a SalesFo= rce model with = + to produce a relationship query from child to parent. = It resolves to the = + following query to SalesForce. + + = + + = + - This query shows the correct syntax to query a SalesForce mo= del with = - to produce a relationship query from parent to child. It resolves= to the = - following query to SalesForce. - - + This query shows the correct syntax to query a SalesFo= rce model with = + to produce a relationship query from parent to child. = It resolves to the = + following query to SalesForce. + + = + + = + + See the description of the + Relationship Queries + operation in the SalesForce documentation for limitati= ons. + +
+ = +
+ Supported Capabilities + + The following are the the connector capabilities suppo= rted by + the Salesforce Connector. These SQL constructs will be= pushed down to + Salesforce. + + = + + + SELECT command + + + INSERT Command + + + UPDATE Command + + + DELETE Command + + + CompareCriteriaEquals + + + InCriteria + + + LikeCriteria - Supported for String fiel= ds only. + + + RowLimit + + + AggregatesCountStar + + + NotCriteria + + + OrCriteria + + + CompareCriteriaOrdered + + + OuterJoins with join criteria KEY + + +
+ = +
+
+ = +
+ Web Services Translator + + The Web Services translator, known by the type name = ws, = + exposes stored procedures for calling web services backed by a= Teiid WS = + resource adapter. It will commonly be used with the = + TEXTTABLE or = + XMLTABLE table functions to = use CSV or XML = + formated data. + + = + + Execution Properties + + + + + + + Name + Description + Default + + + + + DefaultBinding + The binding that should be used if one = is not specified. Can be one of HTTP, SOAP11, or SOAP12 + SOAP12 + + + DefaultServiceMode + The default service mode. For SOAP, ME= SSAGE mode indicates that the request will contain the entire SOAP envelope= and not just the contents of the SOAP body. Can be one of MESSAGE or PAYL= OAD + PAYLOAD + + + XMLParamName + Used with the HTTP binding (typically w= ith the GET method) to indicate that the request document should be part of= the query string. + null - unused + + + +
+ = + + There are ws importer settings, but it does provide metadata f= or dynamic VDBs. + + = +
+ Usage + + The WS translator exposes low level procedures for accessi= ng web services. = + See also the ws-weather example in the kit. + + +
+ Invoke Procedure + + Invoke allows for multiple binding, or protocol modes,= including = + HTTP, SOAP11, and SOAP12. = + + Procedure invoke(binding in STRING, ac= tion in STRING, request in XML, endpoint in STRING) returns XML + + + The binding may be one of null (to use the default) HT= TP, SOAP11, or = + SOAP12. Action with a SOAP binding indicates the SOAP= Action value. = + Action with a HTTP binding indicates the HTTP method (= GET, POST, etc.), = + which defaults to POST. + + = + + A null value for the binding or endpoint will use the = default value. = + The default endpoint is specified in the WS resource a= dapter = + configuration. The endpoint URL may be absolute or re= lative. If it's = + relative then it will be combined with the default end= point. + + = + + Since multiple parameters are not required to have val= ues, it is often = + more clear to call the invoke procedure with named par= ameter syntax. = + = + call invoke(binding=3D>'HTTP', action= =3D>'GET') + The request XML should be a valid XML document o= r root element. +
+ +
+ InvokeHTTP Procedure + + invokeHttp can return the byt= e contents of an HTTP(S) call. = + + Procedure invokeHttp(action in STRING,= request in OBJECT, endpoint in STRING, contentType out STRING) returns BLO= B + = + + Action indicates the HTTP method (GET, POST, etc.), wh= ich defaults to POST. + + + A null value for endpoint will use the default value. = The default endpoint = + is specified in the WS resource adapter configuration.= The endpoint URL may = + be absolute or relative. If it's relative then it wil= l be combined with the = + default endpoint. + + + Since multiple parameters are not required to have val= ues, it is often more = + clear to call the invoke procedure with named paramete= r syntax. + + call invokeHttp(action=3D>'GET') + = + + The request can be one of SQLXML, STRING, BLOB, or CLO= B. The request will be = + sent as the POST payload in byte form. For STRING/CLO= B values this will = + default to the UTF-8 encoding. To control the byte en= coding, see the = + to_bytes function. + +
+
+
+
+ = +
+ Dynamic VDBs - See the description of the - Relationship = Queries - - operation in the SalesForce documentation for limitations. + Teiid integration is available via a "Dynamic VDB" without the nee= d for Teiid Designer = + tooling. While this mode of operation does not yet allow for the = creation of view = + layers, the underlying sources can still be queried as if they are= a single source. See = + the kit's "teiid-example/dynamicvdb-*" for working examples. -
-
- Supported Capabilities - The following are the the connector capabilities supported by - the Salesforce Connector. These SQL constructs will be pushed down to - Salesforce. - - - SELECT command - - - INSERT Command - - - UPDATE Command - - - DELETE Command - - - CompareCriteriaEquals - - - InCriteria - - - LikeCriteria - Supported for String fields only. - - - RowLimit - - - AggregatesCountStar - - - NotCriteria - - - OrCriteria - - - CompareCriteriaOrdered - - - OuterJoins with join criteria KEY - - -
-
-
-
-Web Services Translator -The Web Services translator, known by the type name ws, exposes stored procedures for calling web services backed by a Tei= id WS resource adapter. = -It will commonly be used with the TEXTTABLE or XMLTABLE table functions to use C= SV or XML formated data. - -Execution Properties - - - -Name -Description -Default - - - - -DefaultBinding -The binding that should be used if one is not specified. Can be on= e of HTTP, SOAP11, or SOAP12 -SOAP12 - - -DefaultServiceMode -The default service mode. For SOAP, MESSAGE mode indicates that th= e request will contain the entire SOAP envelope and not just the contents o= f the SOAP body. Can be one of MESSAGE or PAYLOAD -PAYLOAD - - -XMLParamName -Used with the HTTP binding (typically with the GET method) to indic= ate that the request document should be part of the query string. -null - unused - - - -
-There are ws importer settings, but it does provide metadata for dyn= amic vdbs. -
Usage -The WS translator exposes low level procedures for accessing web ser= vices. See also the ws-weather example in the kit. -
-Invoke Procedure -invoke allows for multiple binding, or protocol modes, including HTT= P, SOAP11, and SOAP12. = -Procedure invoke(binding in STRING, action in STRING, requ= est in XML, endpoint in STRING) returns XML - -The binding may be one of null (to use the default) HTTP, SOAP11, or= SOAP12. Action with a SOAP binding indicates the SOAPAction value. Actio= n with a HTTP binding indicates the HTTP method (GET, POST, etc.), which de= faults to POST. -A null value for the binding or endpoint will use the default value.= The default endpoint is specified in the WS resource adapter configuratio= n. The endpoint URL may be absolute or relative. If it's relative then it= will be combined with the default endpoint. -Since multiple parameters are not required to have values, it is oft= en more clear to call the invoke procedure with named parameter syntax. e.g= . call invoke(binding=3D>'HTTP', action=3D>'GET') -The request XML should be a valid XML document or root element. -
-
-InvokeHTTP Procedure -invokeHttp can return the byte contents of an HTTP(S) call. = -Procedure invokeHttp(action in STRING, request in OBJECT, = endpoint in STRING, contentType out STRING) returns BLOB - -Action indicates the HTTP method (GET, POST, etc.), which defaults t= o POST. -A null value for endpoint will use the default value. The default e= ndpoint is specified in the WS resource adapter configuration. The endpoin= t URL may be absolute or relative. If it's relative then it will be combin= ed with the default endpoint. -Since multiple parameters are not required to have values, it is oft= en more clear to call the invoke procedure with named parameter syntax. e.g= . call invokeHttp(action=3D>'GET') -The request can be one of SQLXML, STRING, BLOB, or CLOB. The reques= t will be sent as the POST payload in byte form. For STRING/CLOB values th= is will default to the UTF-8 encoding. To control the byte encoding, see t= he to_bytes function. -
-
-
-
-
-Dynamic VDBs - -Teiid integration is available via a "Dynamic VDB" without the need for Te= iid Designer tooling. While this mode of operation does not yet allow for = the creation of view layers, the underlying sources can still be queried as= if they are a single source. See the kit's "teiid-example/dynamicvdb-*" f= or working examples. - - -To build a dynamic vdb, you'll need to create a "<some-name>-vdb.xml= " file. The XML file captures information about the VDB, the sources it in= tegrate, and preferences for importing metadata. - - - -VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to = recognize this file as a dynamic VDB. - - - -my-vdb.xml: (The vdb-deployer.xml schema for this file is available in the= schema folder under the docs with the Teiid distribution.) - - = - + + To build a dynamic VDB, you'll need to create a = + SOME-NAME-vdb.xml = file. The XML file captures = + information about the VDB, the sources it integrate, and preferenc= es for importing metadata. + + = + + + VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB = deployer to = + recognize this file as a dynamic VDB. + + + = + + my-vdb.xml: (The vdb-deployer.xml schema for this file is availabl= e in the schema = + folder under the docs with the Teiid distribution.) + + = + = + + = @@ -751,107 +1045,238 @@ = = - + = - = + = ... = = - -]]> -
-VDB Element - - Attributes - name - The name of the VDB. The VDB= name referenced through the driver or datasource during the connection tim= e. - - version - The version of the VDB (sh= ould be an positive integer). This determines the deployed directory locat= ion (see Name), and provides an explicit versioning mechanism to the VDB na= me. - - - - Property Elements - UseConnectorMetadata - Setting to us= e connector supplied metadata. Can be "true" or "cached". "true" will obta= in metadata once for every launch of Teiid. "cached" will save a file con= taining the metadata into the <jboss-install>/server/<profile>/= data/teiid directory - - -
-
-Model Element - - Attributes - name - The name of the model is used= as a top level schema name for all of the metadata imported from the conn= ector. The name should be unique among all Models in the VDB and should no= t contain the '.' character. - - version - The version of the VDB (sh= ould be an positive integer). This determines the deployed directory locat= ion (see Name), and provides an explicit versioning mechanism to the VDB na= me. - - - - Source Element - name - The name of the source to use= for this model. This can be any name you like, but will typically be the s= ame as the model name. Having a name different than the model name is only= useful in multi-source scenarios. - - translator-name - The name or type o= f the Teiid Translator to use. Possible values include the built-in types = (ws, file, ldap, oracle, sqlserver, db2, derby, etc.) and translators defin= ed in the translators section. = - - connection-jndi-name - 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 t= he deploying vdb dependencies section for info. You also need to deploy th= ese connection factories before you can deploy the vdb. - - - - Property Elements - importer.<propertyname> - Prop= erty to be used by the connector importer for the model for purposes import= ing 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. - - -
-
-Translator Element - - Attributes - name - The name of the the Translato= r. Referenced by the source element. - - type - The base type of the Translat= or. Can be one of the built-in types (ws, file, ldap, oracle, sqlserver, d= b2, derby, etc.). - - - - - Property Elements - Set a value that overrides a translator default property.= See possible property name/values in the Translator specific section. - - -
-
-
- Multi-Source Models and VDB - When you have multiple instances of data that are using identica= l schema (horizantal sharding), Teiid can help you - aggregate data accoss all the instances, using "multi-source" models. = In this scenario, instead of creating/importing a model for - every data source, user needs to define a one source model that repres= ents the schema and configure multiple data = - "sources" underneath it. During runtime, when a query issued aginst th= is model, the query engine analyzes = - the information and gathers the required data from = - all the sources configured and aggregates the results and provides in = a single result set. +]]> + +
+ VDB Element + + Attributes + + + name + + + The name of the VDB. The VDB name = + referenced through the driver or datasource during the= connection time. + + + + + version + + + The version of the VDB (should be an = + positive integer). This determines the deployed direc= tory location = + (see Name), and provides an explicit versioning mechan= ism to the VDB = + name. + + + + = + + Property Elements + + + UseConnectorMetadata + + + Setting to use connector = + supplied metadata. Can be "true" or "cached". "true" = will obtain = + metadata once for every launch of Teiid. "cached" wi= ll save a file = + containing the metadata into the = + PROFILE/data/teii= d directory + + + + = +
+ = +
+ Model Element + + Attributes + + + name + + + The name of the model is used as a = + top level schema name for all of the metadata importe= d from the = + connector. The name should be unique among all Models= in the VDB and = + should not contain the '.' character. + + + + + version + + + The version of the VDB (should be an = + positive integer). This determines the deployed direc= tory location = + (see Name), and provides an explicit versioning mechan= ism to the VDB = + name. + + + + = + + Source Element + + + name + + + The name of the source to use for this = + model. This can be any name you like, but will typical= ly be the same = + as the model name. Having a name different than the m= odel name is = + only useful in multi-source scenarios. = + + + + + translator-name + + + The name or type of the Teiid Translator to use. Poss= ible values include = + the built-in types (ws, file, ldap, oracle, sqlserver,= db2, derby, etc.) = + and translators defined in the translators section. = + + + + + connection-jndi-name + + + The JNDI name of this source's connection factory. The= re should be a = + corresponding "-ds.xml" file that defines the connecti= on factory in = + the JBoss AS. Check out the deploying VDB dependenci= es section for = + info. You also need to deploy these connection factori= es before you = + can deploy the VDB. = + + + + = + + Property Elements + + + importer.<propertyname> + + + 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 pro= perties you = + can narrow or widen the data elements available for in= tegration. + + + + = +
+
+ Translator Element + + Attributes + + + name + + + The name of the the Translator. Referenced by the sou= rce element. + + + + + type + + + The base type of the Translator. Can be one of the bu= ilt-in types (ws, = + file, ldap, oracle, sqlserver, db2, derby, etc.). + + + + = + + Property Elements + + + Set a value that overrides a translator default proper= ty. See = + possible property name/values in the Translator specif= ic section. + + + = +
+ = +
+
+ Multi-Source Models and VDB + + When you have multiple instances of data that are using identical = schema = + (horizontal sharding), Teiid can help you aggregate data across al= l the = + instances, using "multi-source" models. In this scenario, instead = of = + creating/importing a model for every data source, user needs to de= fine one = + source model that represents the schema and configure multiple dat= a "sources" = + underneath it. During runtime, when a query issued against this mo= del, the query = + engine analyzes the information and gathers the required data from= all the = + sources configured and aggregates the results and provides in a si= ngle result set. + = - To mark a model as "multi-source", the user needs to supply prop= erty called "supports-multi-source-bindings", in the "vdb.xml" file. = - Also, the user need to define multiple sources. Here is code example s= howing single model with multiple sources defined. - + + To mark a model as multi-source, the user needs to supply property= called = + supports-multi-source-bindings, in the "vdb.x= ml" file. = + Also, the user needs to define multiple sources. Here is code exam= ple showing single model with = + multiple sources defined. + + = + - - - - - - = - ]]> = - In the above example, the VDB defined has single model called "C= ustomers", that has multiple sources, namely = - chicago, newyork, la that define different instances of data. Every ti= me a model is marked as "multi-source", the = - runtime engine adds a additional column called "SOURCE_NAME" to every = table in that model. This column maps to the = - source's name from the XML. For example, in the above xml that would b= e "chicago", "la", "newyork". Essentially then = - user can write queries like - = - Note that when user do not supply the "SOURCE_NAME" in the crite= ria, it applies to all the sources. Unfortunately = - Teiid currently do not support INSERT, this planned for future release= s. Another useful feature along with this = - feature is "partial results" to skip unavailble souces if they are dow= n. - Currenlty the tooling support for managing the multi-sourc= e feature is limited, so if you need to use this feature - build the VDB as usual in the Teiid Designer and then edit the "vdb.xm= l" file in the VDB archive using a Text editor to = - add the addtional sources as defined above. Make sure that you also de= ploy a data source for each source defined. -
+ + + + + +]]> = + + In the above example, the VDB defined has single model called Customers, = + that has multiple sources (chicago, ne= wyork, = + and la) that define different instances of data= . Every = + time a model is marked as "multi-source", the = + runtime engine adds a additional column called "SOURCE_NAME" to ev= ery table in = + that model. This column maps to the source's name from the XML. In = + the above XML code that would be chicago, la, = + newyork. This allows queries like the following: + + = + + = + + Note that when user do not supply the "SOURCE_NAME" in the criteri= a, it applies = + to all the sources. Unfortunately Teiid currently does not support= INSERT, this = + planned for future releases. Another useful feature along with thi= s feature is = + "partial results" to skip unavailable sources if they are down. + + = + + + Currently the tooling support for managing the multi-source fe= ature is = + limited, so if you need to use this feature build the VDB as u= sual in = + the Teiid Designer and then edit the "vdb.xml" file in the VDB= archive = + using a Text editor to add the additional sources as defined a= bove. = + You must deploy a data source for each source defined. + + + = + +
\ No newline at end of file --===============0889744811073655073==--