Five Stars

How to send column value of excel formula alone to DB table

I am pulling data from Database and storing it in Excel. Excel will then calculate formula and generate the formula results in new columns. Now i need to send the data of new column alone back to Database

 

Example:-

 

  • DB table name is Employee
  • Column's are EMP ID, FIRST NAME, LAST NAME, FULL NAME
  • Currently, data is present in this EMPLOYEE table for 1st three columns (i.e. EMP ID, FIRST NAME, LAST NAME) and FULL NAME is blank.
  • NOW, i want to concatenate FIRST NAME and LAST NAME in last column of excel FULL NAME and send only the result of concatenation (FULL NAME column) back to Database
  • In this case, source and destination table are same.

Employee Table-->tMap-->Excel (In this excel, the first 3 columns along with the result of FIRST NAME concats LAST NAME to last column FULL NAME will be present) -->tMap (to send only the FULL NAME column to DB table)-->Employee Table (Now, the EMPLOYEE table will be having a data in FULL NAME column)

 

I am finding difficult in 2nd tMap to send the value of formula output (FULL NAME column alone) to EMPLOYEE table.

 

Please suggest to achieve this..

1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars

Re: How to send column value of excel formula alone to DB table

@samisyed80,you should create file from DB that the any record updated or created in DB using procedure.in Talend job you can check for that file using tWaitforfile and if the file is avilable you can contionue your main logic.

Manohar B
7 REPLIES
Eleven Stars

Re: How to send column value of excel formula alone to DB table

@samisyed80,you can design in below way.

 

for fullname you below exp in tmap.

 

row1.FIRST NAME + row1.LAST NAME

 

 

Untitled.png

Manohar B
Five Stars

Re: How to send column value of excel formula alone to DB table

Gotcha, i assume the output excel in 1st flow and the input excel in the second flow are same. Right?

Eleven Stars

Re: How to send column value of excel formula alone to DB table

Yes @samisyed80

Manohar B
Five Stars

Re: How to send column value of excel formula alone to DB table

Thanks Manohar.

 

One more query.

 

Whenever there's any update or new entry happened in the the mentioned Input DB table, then this job should automatically kick-start. How to do this?

Eleven Stars

Re: How to send column value of excel formula alone to DB table

@samisyed80,you should create file from DB that the any record updated or created in DB using procedure.in Talend job you can check for that file using tWaitforfile and if the file is avilable you can contionue your main logic.

Manohar B
Five Stars

Re: How to send column value of excel formula alone to DB table

Thanks Manohar. Appreciate it.

Five Stars

Re: How to send column value of excel formula alone to DB table

create a file in the sense? can u tell me the component name which i should use for the creation of file?

 

tWaitforfile is coming in the picture after the above process right?