From teiid-commits at lists.jboss.org Tue Sep 14 13:18:40 2010 Content-Type: multipart/mixed; boundary="===============6424490647539134671==" MIME-Version: 1.0 From: teiid-commits at lists.jboss.org To: teiid-commits at lists.jboss.org Subject: [teiid-commits] teiid SVN: r2570 - branches/7.1.x/documentation/reference/src/main/docbook/en-US/content. Date: Tue, 14 Sep 2010 13:18:40 -0400 Message-ID: <201009141718.o8EHIesb018874@svn01.web.mwc.hst.phx2.redhat.com> --===============6424490647539134671== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: rareddy Date: 2010-09-14 13:18:39 -0400 (Tue, 14 Sep 2010) New Revision: 2570 Modified: branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/tr= anslators.xml Log: TEIID-1255: adding documentation about multi-source models. 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 15:17:27 UTC (rev 2569) +++ branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/t= ranslators.xml 2010-09-14 17:18:39 UTC (rev 2570) @@ -815,4 +815,43 @@ +
+ 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. + = + 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. + + + + + + + + = + ]]> = + 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. +
+ \ No newline at end of file --===============6424490647539134671==--