#1 2008-04-17 14:16:47

Caroline
Guest

tDBInput and ODBC

Hi,

tDBInput is used to read in all kind of databases. But, is it work only with ODBC ?

Regards,

Caroline

#2 2008-04-17 14:38:01

mhirt
Talend team
Registered: 2006-09-19
Posts: 1658

Re: tDBInput and ODBC

yes, tDBInput uses ODBC
tJDBC allow generic connexion trough JDBC

What would you like to do ?

Offline

#3 2008-04-17 16:35:59

Caroline
Guest

Re: tDBInput and ODBC

I would like to use a component capable to read all kind of databases (thus user can use context variables to enter his database connection).

#4 2008-04-17 20:56:52

mhirt
Talend team
Registered: 2006-09-19
Posts: 1658

Re: tDBInput and ODBC

I don't really understand what you reall wants to do.
All your databases have the same tables with the same columns ?

Offline

#5 2008-06-02 10:50:32

qunu34
Guest

Re: tDBInput and ODBC

I to have something similar in mind, but not different databases. I would like it if I could change the IP address of my database connections with a variable field you can change on setup if you wan to.

Cheers
qunu

#6 2008-06-02 19:12:48

SMaz
Member
Registered: 2008-04-21
Posts: 186
Website

Re: tDBInput and ODBC

You can easily do this in Talend.

Just define your context variables and use them as parameters in your tXXXInput, tXXXOutput, tXXXRow components.

I've posted some examples.


Uploaded Images

Offline

#7 2008-07-07 09:59:42

tradercpr
Member
Registered: 2007-08-30
Posts: 20

Re: tDBInput and ODBC

Hello,

i have in a string field a date in this format String ( 02/01/1900 00:00:00)
I would like to have it like yyyy-mm-dd in an output field (in string)
I use a Tmap1 and i want to include in it.
I've try TalendDate.formatDate("yyyy/MM/dd 00:00:00",TalendDate.parseDate("yyyy-MM-dd",row1.dateemission)),  but i can't get a good result

Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "02/01/1900 00:00:00"
    at routines.TalendDate.parseDate(TalendDate.java:87)
    at blueprint.ekb_p112_expertbo_ais_date.EKB_P112_ExpertBO_AIS_date.tFileInputDelimited_1Process(EKB_P112_ExpertBO_AIS_date.java:947)
    at blueprint.ekb_p112_expertbo_ais_date.EKB_P112_ExpertBO_AIS_date.runJobInTOS(EKB_P112_ExpertBO_AIS_date.java:3245)
    at blueprint.ekb_p112_expertbo_ais_date.EKB_P112_ExpertBO_AIS_date.main(EKB_P112_ExpertBO_AIS_date.java:3161)
Caused by: java.text.ParseException: Unparseable date: "02/01/1900 00:00:00"
    at java.text.DateFormat.parse(Unknown Source)
    at routines.TalendDate.parseDate(TalendDate.java:85)


Thanks

Offline

#8 2008-07-07 10:23:53

jcoutin
Member
Registered: 2008-05-30
Posts: 170

Re: tDBInput and ODBC

Hello,

Try this way :

TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd/MM/yyyy HH:mm:ss",row1.dateemission))

It works well with row1.dateemission = 02/01/1900 00:00:00

JC

Offline

#9 2008-11-11 00:01:16

Bill
Guest

Re: tDBInput and ODBC

Hate to dig up an old thread, but this is really bothering me.

If I have already created a context in the repository and imported it into my job, how do I then create an additional context and use the same steps to configure two different contexts?

When I try to do this using the button on the lower left of the Variables tab under Contexts, it shows me the context in the popup but shows nothing when I try to expand it and select the variables.

If you don't create all your contexts before importing the vars in your job you can't use this feature?

Board footer

Powered by FluxBB