#1 2008-12-09 11:09:21

Martin Braun
New member
Registered: 2008-12-09
Posts: 4

change column name

Hi,

how can I change column names.
I try to read a MSSQL table and change from db column names to schema names and write them with these new names into a MSSQLOutput.
I found out that I can change the names at the MSSQLOutput component but this is not realy nice, if i want to create mutliple outputs from one source.
In this case I have to this for each output.

Hope there is a easier way...

so long

Martin

Talend Open Studio 3.0.0.r18993 Java

Offline

#2 2008-12-10 03:48:32

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: change column name

Hello

I try to read a MSSQL table and change from db column names to schema names and write them with these new names into a MSSQLOutput.

The db column names must be the same as the real column names in your DB tables.

I found out that I can change the names at the MSSQLOutput component but this is not realy nice, if i want to create mutliple outputs from one source.

Yes, the tReplicate component can fit your need. You can create multiple outputs from one source with it, for example:
tMSSQLInput--tReplicate--tMSSQLOutput
                         |
                         tLogRow

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2008-12-10 08:59:09

Martin Braun
New member
Registered: 2008-12-09
Posts: 4

Re: change column name

Hello,

thank you shong.

I'm a bit irritated.

I can't understand, why the column names must be the same as the real DB names.
If I do some calculation on the field, or generate a new field, I'm also able to change the name.
In any other ETL tool I testet, it was possible to change column names, as first step of a etl process.
I can't belive that there is no way in talend.

:-\

best regards

Martin

Offline

#4 2008-12-10 09:20:04

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

Re: change column name

You can use the column label you want in your whole job.
You just have to map your own column label to the real db label somewhere....

This can be done in a tMap just before the tYourDBOutput or within the tYourDBOutput component with the Advanced Setting / Use Field option (but as it's not graphical it 's much more complicate than using an intermediate tMap...)

Hth,

Offline

#5 2008-12-10 10:00:26

Martin Braun
New member
Registered: 2008-12-09
Posts: 4

Re: change column name

Hi,

thank you mhirt.
this works fine and solves my problem!

tnx

Martin

Offline

#6 2012-02-22 05:49:05

Anchit
Guest

Re: change column name

Hi,

Using a source file we created a job and got the output. Next time when the updated source file comes  with following updations:

1. with an extra column
2. names of 2 columns are different.


Can we use the same Job again using the same schema so that extra column is updated dynamically and no impact with 2 differing column names.

as it's an irritating and monotonous task to create the same job again.

Can any 1 help

Thanks in advance,
Anchit

#7 2012-02-22 05:52:05

Anchit
Guest

Re: change column name

Hi,

Using a source file we created a job and got the output. Next time when the updated source file comes  with following updations:

1. with an extra column
2. names of 2 columns are different.


Can we use the same Job again using the same schema so that extra column is updated dynamically and no impact with 2 differing column names.

as it's an irritating and monotonous task to create the same job again.

Can any 1 help

Thanks in advance,
Anchit

Board footer

Powered by FluxBB