Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Boris_From_France
Contributor
Contributor

Get informations from Oracle database

Hello everyone. I'm Boris and I'm quiet new in Talend.

I have an issue I can't solve.

I have a csv input with 2 fields (Code, Amount), and an oracle function that takes Code in input and result with Libelle. I just want in output Code, Libelle, Amout.

I tried tFileInputDelimiter -> TDBSP -> tFileOutputDelimiter, but I just have the Libelle.

with the tMap, I can connect the 2 components, but it seems that the Code is empty when the function is called

and I can't connect the tFileInput to the tDBSP and the tMap at the same time.

This example is very simplified. In fact I have a 234 rows input excel and I have to call several complex fonctions to fill extra fields in the output (all the 234 fields + some extra fields).

How Can I do to have both my fields from the input file, and the results of my functions called with in parameters comming from the same file ?

I hop it's clear 😉

Thanks a lot

Boris

2 Replies
Nicolenix
Contributor
Contributor

Hello,

 

To solve your problem, you can use a combination of components in Talend to achieve your desired output. Here's an outline of the steps you can follow:

 

Use the tFileInputDelimited component to read the CSV input file. Configure it to read the two fields (Code, Amount) from the file.

 

Connect the tFileInputDelimited component to a tMap component. In the tMap, you can define the mapping between the input fields and the output fields.

 

Add a new output column in the tMap for the "Libelle" field.

 

Use a tJavaRow component in the tMap to call your Oracle function. Inside the tJavaRow, you can invoke the function using the Code as input and retrieve the corresponding Libelle value.

 

Connect the tJavaRow to the output column for "Libelle" in the tMap.

 

Configure the tFileOutputDelimited component to official website write the output to a CSV file. Include the Code, Libelle, and Amount fields in the output.

 

By using the tMap component, you can connect the input file, the Oracle function, and the output file together in a single flow. The tJavaRow allows you to call your complex functions and populate the output fields.

 

 

Boris_From_France
Contributor
Contributor
Author

Hi, and thank you very much for your answer and your quick answer. Unfortunately, my knowledge on Java is too weak to even try this. I did research on google to find a way, but with no success. I'm working on a workaround.

But thanks again for your answer

 

Boris