Author: rareddy
Date: 2010-06-08 13:24:18 -0400 (Tue, 08 Jun 2010)
New Revision: 2198
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/example-explained.xml
trunk/documentation/quick-start-example/src/main/docbook/en-US/images/steps-defined.png
trunk/documentation/quick-start-example/src/main/docbook/en-US/images/steps.png
Log:
TEIID-973: made some changes to fix the quick start guide for the latest text connector
changes. Still not complete with out the re-modelled VDB and a new video showing the
process. When the new video being recorded, then we will add the derbyclient step into
it.
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml
===================================================================
---
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml 2010-06-08
16:33:19 UTC (rev 2197)
+++
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/buildvdb.xml 2010-06-08
17:24:18 UTC (rev 2198)
@@ -37,8 +37,11 @@
<para>Import the Derby database's "account" schema into a
source model.</para>
</listitem>
<listitem>
- <para>Manually create the source model for the "Text File".
Create a Table called "Price" with
- "stock" and "price" as column names</para>
+ <para>Manually create the view model for the "Text File". Create
a Table called "Price" with
+ "stock" and "price" as column names. In the transformation
window add the following SQL</para>
+ <programlisting><![CDATA[
+ SQL text here..
+ ]]> </programlisting>
</listitem>
<listitem>
<para>Create a view model called "AccountView"</para>
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml
===================================================================
---
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml 2010-06-08
16:33:19 UTC (rev 2197)
+++
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/connect-vdb.xml 2010-06-08
17:24:18 UTC (rev 2198)
@@ -7,6 +7,12 @@
this process is no different than connecting to any other JDBC source like
Oracle.</para>
<sect1>
<title>Stand-alone Java Application Deployment</title>
+
+ <para>Before you can make a JDBC connection to the Teiid VDB, add the
Teiid's driver jar file to your application's classpath</para>
+ <programlisting><![CDATA[
+ ${jboss-install}/server/${profile}/lib/teiid-${version}-client.jar
+ ]]> </programlisting>
+
<para>
For a Java application to connect to a JDBC source, it needs a URL, user-id, and
password. To
connect to your VDB all you need is a URL and any additional optional properties
that you would like to set.
@@ -95,8 +101,7 @@
You are encouraged to experiment with queries that go beyond the simple "select
* from CustomerAccount".
</para>
- <para>If your application is Web based, you can also deploy Teiid in an
application server
- and treat it as any other JDBC source by creating a connection pool with the
+ <para>If your application is Web based, you can create data source for your VDB
using the above and treat it as any other JDBC source using
<emphasis>org.teiid.jdbc.TeiidDataSource</emphasis> and assigning it a JNDI
name.
Refer to <ulink
url="https://community.jboss.org/docs/DOC-13888">deployment to application
server</ulink> for more information.
</para>
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml
===================================================================
---
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml 2010-06-08
16:33:19 UTC (rev 2197)
+++
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/deployment.xml 2010-06-08
17:24:18 UTC (rev 2198)
@@ -2,55 +2,35 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="deployment">
<title>Deployment</title>
- <para> Having built the VDB, it must be deployed so it can be access through a
JDBC connection.</para>
- <para> Teiid is typically used in one of two manners:</para>
- <itemizedlist>
- <listitem>
- <para>
- As a
- <link linkend="stand-alone-deployment">Stand-alone</link>
- Java application
- </para>
- </listitem>
- <listitem>
- <para>In a JEE Application Server (Deploy and Create connection
pool).</para>
- </listitem>
- </itemizedlist>
+ <para> Having built the VDB, it must be deployed into Teiid server, so it can be
accessed through a JDBC connection.</para>
+
<para />
- <para>This example deploys Teiid within a stand-alone Java application. The
sample deployment is shown below.
+ <para>This example deploys Teiid within a JBoss AS. The sample deployment is
shown below.
You can find more details about deploying to application servers on the Teiid
web-site</para>
<para />
- <sect1 id="stand-alone-deployment">
- <title>Stand-alone Application Deployment</title>
+ <sect1 id="teiid-runtime">
+ <title>JBoss AS Application Deployment</title>
+
<orderedlist>
<listitem>
- <para>Add the
"${jboss-install}/server/${profile}/lib/teiid-${version}-client.jar" to your
application classpath</para>
- </listitem>
- <listitem>
<para>
Before we can deploy the VDB to the server, we need to create and deploy the
required Connection Factories for Derby
and File sources. Connection Factories are sources that provide the data then
their data is integrated through Teiid. If you are
familiar with creating data sources or connection factories in JBoss AS, then
this is exactly the same operation.
</para>
- <para>For this example we need to create three (3) different data sources.
You would first need to create a data source to Derby.
- See ${teiid-examples}/portfolio/PortfolioModel/portfolio-ds.xml.
- Then create Teiid specific connection factories to Derby and File sources.
- See ${teiid-examples}/portfolio/PortfolioModel/derby-connector-ds.xml
- and
${teiid-examples}/portfolio/PortfolioModel/text-connector-ds.xml</para>
-
- <para>The reason we created a data source and also a Connection Factory for
Derby is, the data source provides a
- JDBC connection to the portfolio database, and the Connection Factory provides a
Teiid wrapper around
- data source that understands execution and query translation defined by the Teiid
runtime. The concerns about the
- connection and Teiid access are separated into two different sources. So, the
data source can be used by any other application
- however the Teid connection factory is only used by the Teiid. This will be case
for any JDBC
- based sources. The same is not true for File source, because File Connector can
access the resource directly itself.</para>
- <para>To deploy these connection factories copy the "-ds.xml"
files into "${jboss-install}/server/{profile}/deploy" directory.
- Make sure they are started correctly and you have supplied correct credentials
for data source. </para>
+ <para>For this example we need to create three (2) different data sources.
You would first need to create a data source to Derby,
+ then to File source. See or copy the following</para>
+ <programlisting><![CDATA[
+ ${teiid-examples}/portfolio/PortfolioModel/portfolio-ds.xml
+ ${teiid-examples}/portfolio/PortfolioModel/marketdata-file-ds.xml
+ ]]> </programlisting>
+ <para>files into "${jboss-install}/server/{profile}/deploy"
directory.</para>
</listitem>
<listitem>
- <para>Place your VDB in a the
"${jboss-install}/server/{profile}/deploy" directory. If the JBoss AS is not
already
- started, start by running the "${jboss-install}/bin/run.sh" or
"${jboss-install}/bin/run.bat" scripts.
+ <para>The above data sources provide the data to your VDB. Now to deploy
your VDB, place your VDB in a the "${jboss-install}/server/{profile}/deploy"
directory.
+ If the JBoss AS is not already started, start by running the
"${jboss-install}/bin/run.sh" or "${jboss-install}/bin/run.bat"
scripts.
+ Make sure there were no errors during the deply of the VDB
</para>
</listitem>
<listitem>
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/example-explained.xml
===================================================================
---
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/example-explained.xml 2010-06-08
16:33:19 UTC (rev 2197)
+++
trunk/documentation/quick-start-example/src/main/docbook/en-US/content/example-explained.xml 2010-06-08
17:24:18 UTC (rev 2198)
@@ -99,7 +99,7 @@
</programlisting>
<para>We need to start the Derby RDBMS and create the "accounts"
database with the below schema. These
commands are intended for a Linux environment. For starting the Derby instance on
another platform, you will need to use
- commands appropariate to that platform.</para>
+ commands appropriate to that platform.</para>
<para>Start a terminal session, and change directory to where
Derby is installed and execute following commands</para>
<programlisting><![CDATA[
@@ -126,82 +126,10 @@
</sect1>
<sect1 id="step-2">
<title>Step-2: Describe the CSV file and its contents</title>
- <para>In order to use a Text file as the source, we need to define two
different types of files: A descriptor
- file and one or more data files. Conceptually, a Descriptor file defines a schema,
and each data file defines
- data inside a table</para>
+ <para>In order to use a Text file as the source, we need a data file defines
data inside a table</para>
<orderedlist>
<listitem>
- <para>Text Descriptor File - The Text Descriptor file defines the
structure
- of the text file you want to use as a data source. The path to the data file,
delimiter character used,and the number
- of header lines are attributes of the Descriptor file.
- A sample descriptor file is shown below.</para>
- <programlisting><![CDATA[
- MarketData.Price.location = /path/to/marketdata-price.txt
- MarketData.Price.delimiter = ,
- MarketData.Price.headerLine = 1
- ]]>
- </programlisting>
- <para>The table shown below details some of the available properties that
can be used in a Descriptor file. For
- full details look in Text File Connector documentation</para>
- <table frame="all">
- <title>Connection Properties</title>
- <tgroup cols='2' align='left' colsep='1'
rowsep='1'>
- <colspec colname='c1' colwidth="1*" />
- <colspec colname='c2' colwidth="1*" />
- <thead>
- <row>
- <entry>
- <para>Property</para>
- </entry>
- <entry>
- <para>Description</para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>location</para>
- </entry>
- <entry>
- <para>The path to the file on the local system or URL to remote
file.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>delimiter</para>
- </entry>
- <entry>
- <para>The character the file uses to delimit the fields within
each line in the file</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>headerLine</para>
- </entry>
- <entry>
- <para>The line number in which the names of the columns are
defined</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>skipHeaderLines</para>
- </entry>
- <entry>
- <para>The number of top lines to skip in a text file (include one
for the header).</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>Note that each property line starts with the "schema"
information and followed by the logical "table"
- name and then the "property" itself. In the above sample file
"MarketData" is the schema and "Price" is
- the table. The sample Descriptor file is for a 'single' table. You can
define multiple tables in the
- same Descriptor file, but each "location" property for a given
"table" must point to different data file.</para>
- </listitem>
- <listitem>
- <para>Data File: This is the file that is identified by the
"location" property in the Descriptor file.
- Each data file contains column information for the table. The
+ <para>Data File: Each data file contains column information for the table.
The
column information is typically defined on line 1 as header line in the file,
and all the following lines
contain the actual rows of data. Each single line corresponds to single row. A
portion of the sample file
is shown below. The complete sample file is
"examples/portfolio/marketdata-price.txt".</para>
Modified:
trunk/documentation/quick-start-example/src/main/docbook/en-US/images/steps-defined.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/quick-start-example/src/main/docbook/en-US/images/steps.png
===================================================================
(Binary files differ)