newbie getting started with tdt 3.6- variables in job file

View: New views
2 Messages — Rating Filter:   Alert me  

newbie getting started with tdt 3.6- variables in job file

by Tom Kast-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

hello,

 

it is my understanding that invoking the loader like this:

%JAVA_DIR% -classpath %OCTOPUS_HOME%\lib\xml-apis.jar;%OCTOPUS_HOME%\lib\xercesImpl.jar;%OCTOPUS_HOME%\lib\Octopus.jar -DOCTOPUS_HOME=%OCTOPUS_HOME% org.webdocwf.util.loader.Loader -v DB=Oracle tdt\LoaderJob.olj

 

will assign the value "Oracle" to the variable "DB"

 

here is my LoaderJob.olj variable declaration:

<variables>

            <variable name="DB" value="default" prefix="$" suffix="$" override="true" replaceInConstants="true"

            replaceInSQL="true" replaceInData="true" replaceInJDBC="true"/>

            </variables>

 

then i try to read the value lower in the .olj file:

    <sql commit="true" name="CreateOracleTables" onErrorContinue="true">

        <sqlStmt>

            <include href="../sql/create$DB$Tables.sql" parse="text"/>

        </sqlStmt>

    </sql>       

 

but the value remains "../sql/create$DB$Tables.sql" as thought DB was not a variable.

 

thanks,

 

tom

 

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.



--
You receive this message as a subscriber of the octopus@... mailing list.
To unsubscribe: mailto:octopus-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

RE: newbie getting started with tdt 3.6- variables in job file

by Sinisa Milosevic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

You can replace variable values only in  constant columns, SQL statements, loaded data from source database and in jdbc definitions…

 

replaceInConstants

The replace take place in Constants.

false

replaceInSQL

The replaces take place in SQL.

false

replaceInData

The replaces take place in Data.

false

replaceInJDBC

The replaces take place in JDBC.

false

 

In your case you tried to replace variable inside xml definition. So it will not cause any replacement of variables inside this element.

 

Regards,

Sinisa

 

 

-----Original Message-----
From: Tom Kast [mailto:Tom.Kast@...]
Sent: 19. oktobar 2006 0:59
To: octopus@...
Subject: [octopus] newbie getting started with tdt 3.6- variables in job file

 

hello,

 

it is my understanding that invoking the loader like this:

%JAVA_DIR% -classpath %OCTOPUS_HOME%\lib\xml-apis.jar;%OCTOPUS_HOME%\lib\xercesImpl.jar;%OCTOPUS_HOME%\lib\Octopus.jar -DOCTOPUS_HOME=%OCTOPUS_HOME% org.webdocwf.util.loader.Loader -v DB=Oracle tdt\LoaderJob.olj

 

will assign the value "Oracle" to the variable "DB"

 

here is my LoaderJob.olj variable declaration:

<variables>

            <variable name="DB" value="default" prefix="$" suffix="$" override="true" replaceInConstants="true"

            replaceInSQL="true" replaceInData="true" replaceInJDBC="true"/>

            </variables>

 

then i try to read the value lower in the .olj file:

    <sql commit="true" name="CreateOracleTables" onErrorContinue="true">

        <sqlStmt>

            <include href="../sql/create$DB$Tables.sql" parse="text"/>

        </sqlStmt>

    </sql>       

 

but the value remains "../sql/create$DB$Tables.sql" as thought DB was not a variable.

 

thanks,

 

tom

 

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.



--
You receive this message as a subscriber of the octopus@... mailing list.
To unsubscribe: mailto:octopus-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws