|
From: Dejan K. <dej...@ya...> - 2003-03-28 22:00:41
|
>Is "sqlScript" a SELECT statement in this case? What
goes in "attributeSql"?
SqlEnrich can use sqlScript or attributeSql (or both).
When sqlScript is used, a first row that is returned
will contain data for attribute values. Attribute
names will be set using column names. So if you have:
sqlScript=SELECT ATTR1, ATTR2 FROM SOME_TABLE WHERE
ID=5
a document will get two attributes named ATTR1 and
ATTR2 and their values will be values returned from
query. Note that only first row will be used others
will be ignored.
If you want every attribute have specific sql query
for setting attribute value you can use attributeSql
options:
attributeSql.attr1= SELECT DATA FROM SOME_TABLE WHERE
ID=10
attributeSql.attr2=SELECT .....
You can have as many attributeSql options (with
different attribute names) as you want. Note that only
first column of first row will be used for setting
attribute value.
>Is this Stage capable of reading a Long ?VarChar /
CLOB?
I am not sure if it can handle CLOBS (I am pretty sure
it won't work on Oracle) but Varchar and Long should
work. I have worked with Oracle so I really don't know
how Sysbase will work.
>Can "resourceName" be pointed to a Weblogic Database
Connection Pool?
resourceName is name of connection defined as Babeldoc
resource. I believe currently it won't work with
Weblogic db conn pool, but I think it is possible to
implement using JNDI data sources (Bruce, what you
think?)
>So, this is where I would use "transformationScript"?
What value do I give it, the value given in
"attributeSql" for the SqlEnrich Stage?
Since transformationScript is used as 'inline' value
you should use Velocity script to get the value of
document attribute. So if you have set attribute
xslScript in previous step (SqlEnrich) you shoud have
something like:
transformationScript=${document.get('xslScript')}
This will be evaluated to value of attribute xslScript
which is value that you have slected using sql in
previous step
> Also, "transformationFile" becomes a 0..n, right?
Right!
Best Regards,
Dejan
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
|