You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi All,
While creating a new DB connection we will give the details like DB driver, Data source name login details etc,.
Is there any facility, that allows to read the above(database) details from a File? That is, I will give the same details in a file. Now my job needs to load the DB property details from that file.
Is that possible? If it is, plz tell me how to do that.
Regards,
Venky
Last edited by venky (2007-04-19 06:18:57)
Offline

Hi rbillerey,
Can i find any documentation on this component.?
The schema of this component contans only two fileds, Key and value and those are noneditable, but i need fields with details like DB driver name, DB name, login details.. etc.
I would like to read the DB properties details from this file instead of entering manually, which we do while creating a new DB connection.
plz tell me how to use this component for this purpose.
Thanks in advance,
Venky
Offline

Here's the way to do it :
1/ Create the context variables you need : host, port, database, user, password ( in the Properties/Context panel ; to display this panel, click the background of the job design panel )
2/ Set the property fields of your tDBInput component with the context variables you've just created ( use CTRL - SPACE to display the variable list ).
3/ Create a csv file like this :
host;your_host port;your_port database;your_db user;your_user password;your_password
4/ Use a tFileInputDelimted with a 2 column schema ( key, value ) and connect it to a tContextLoad
5/ Connect the tContextLoad component to your tDBInput with a trigger/Run if Ok
6/ Run your job ( F6 )
Hope it helps
Offline

Hi rbillerey,
Thanks for your timely reply. But i couldn't make this. My job is unable to read the DBProperty details from context variables.
I am using java version.
i have followed the steps as you said,
i have created context varibles and selected the context type from repository.
I have connected tFileinputdelimited(CSV which u said to create), with schema(key,value), with tContextLoad component.
And tContextLoad and tSybaseInput with 'run if ok' connection.
Before connecting, the schema of the tContextLoad is, Key, value. But after connecting with the fileinput, the schema is changed to,
Key,value,key,value.
Fileinput schema: tContextLoad schema: (NON EDITABLE)
key key
value value
key
value
I think, this non similarity in schema is giving me the error(unable to read the DBProperty details from context variables).
plz correct if i did any mistake and tell me how to solve this.
Thanks in advance,
Venky
Offline

The schema of tLoadcontext is non editable. All the 4 columns(key,value,key,value) are read-only. There are no columns which are not read-only. And the right arrow(-->, for sync. the schema) is also not active.
So, how can i change this schema relevant to tFileinput.
Offline

rbillerey wrote:
Hi,
This issue has been fixed and will be available in next release of TOS.
It still bugs in TOS 2.1.0 with Java !?!
There is way to skip it : delete the input rows in the tLoadContext then create them again in your tFileInput
Offline

!!
I correct the error using the method above, I run the job and it works.
I save the job, I close it, I open it again and the error is still here !
What appends ?
Do you manage to use tContextLoad ?
TOS 2.1.0 r4515
regards,
have a good week end
Ben
Offline

mhirt wrote:
(0003153)
mhirt
2007-07-31 00:14
Your column have to be named "key" and "value" in lowercase.
Thank you mhirt !
Nullable must be set at yes and length at 255. This must be exactly the same schema
(When issues are closed, can we add notes ?)
Offline
Pages: 1