Edit a .csv file

Six Stars

Edit a .csv file

Hello, everyone.

 

Since I'm new in this Talend World.

I'm exploring the tool, but I was wondering how could I categorize the information of a .csv file, also, I would like to know how I can sumarize the quantities included in that file and if it's possible to organize the information in alphabetical order.

 

Best regards and thanks for your help.

Daniela Muniz

Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: Edit a .csv file

Sixteen Stars

Re: Edit a .csv file

Look at the data types for the columns you are getting your data from. They are Strings. In fact, it looks like all of your columns are Strings. You need those columns set as Double. Go to your file component schema and alter the data type to Double. You will need to make sure that all of your column types are correct to carry out calculations like this.

Sixteen Stars

Re: Edit a .csv file

You will need to show us your input file component config, your tAggregateRow config and let us know how many rows pass through the job when it runs. I'll look again in the morning to see if this has been answered while I am away


All Replies
Forteen Stars TRF
Forteen Stars

Re: Edit a .csv file

Six Stars

Re: Edit a .csv file

Thanks a lot for your help.
I was trying to use the tsortrow to order in alphabetical ascendent order the content (products column) on the csv file and multiplicate two columns with the aggregaterow, showing the results into an output csv file, but I couldn't.
The files you shared to me were helpful in some way Smiley Happy

Daniela Muniz
Six Stars

Re: Edit a .csv file

Thanks a lot for your help.
I was trying to use the tsortrow to order in alphabetical ascendent order the content (products column) on the csv file and multiplicate two columns with the aggregaterow, showing the results into an output csv file, but I couldn't.
The files you shared to me were helpful in some way Smiley Happy
Daniela Muniz
Moderator

Re: Edit a .csv file

Hi,

What's the error message you are getting? Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Edit a .csv file

I'm using the tmap component to make a mathematical operation (multiplication) with the values of two different columns (price and quantity, string type as the SMUL requires) and then when I have checked all the values content in every single component I'm using and verify all of them to be string type, this message appears:Captura de pantalla (1).pngCaptura de pantalla (4).pngCaptura de pantalla (5).pngI don't know if I'm doing or using the correct sentences or flow.

Do you have any idea of why this is happening?

 

Thanks a lot Smiley Wink

Best regards

Daniela Muniz
Sixteen Stars

Re: Edit a .csv file

Look at the data types for the columns you are getting your data from. They are Strings. In fact, it looks like all of your columns are Strings. You need those columns set as Double. Go to your file component schema and alter the data type to Double. You will need to make sure that all of your column types are correct to carry out calculations like this.

Six Stars

Re: Edit a .csv file

Thank you!

I already set the columns as double, but when I check the .xls output file, it has no data, only the headers Smiley Sad and the .csv original file has data, so I don't know what else I could do.Captura de pantalla (6).pngCaptura de pantalla (7).png

 

This one is the original file:

Captura de pantalla (8).pngIt is possible to order the data in alphabetical order?

I'm sorry if I'm making so many questions, I really appreciate your help.

Daniela Muniz
Sixteen Stars

Re: Edit a .csv file

You will need to show us your input file component config, your tAggregateRow config and let us know how many rows pass through the job when it runs. I'll look again in the morning to see if this has been answered while I am away

Six Stars

Re: Edit a .csv file

I realized I had the property "Catch lookup inner join reject" (in the tmap) as false, then I set it as true and it worked.

 

Thanks a lot for your support.

Daniela Muniz
Sixteen Stars

Re: Edit a .csv file

I feel stupid for not spotting that from the screenshot last night. Good catch :-)

Six Stars

Re: Edit a .csv file

Don't feel like that.

I do feel stupid because it was "Catch output reject", not the inner join haha.

 

Best regards Smiley Wink

Daniela Muniz