output file with .csv format

Four Stars

output file with .csv format

Hi,

 

I am facing an issue. I want to save file .csv extension but not the columns separated with delimiter. I want every column to be in different cell. 

 

For example,

I want

NameAge
ABC12

But, using tFileDelimited component, I am getting as

NameAge
ABC12

 

I know, this is possible by creating excel file, but I want csv file. 

 

Is there any solution?

 

Thanks,

Suneel.


Accepted Solutions
Eight Stars

Re: output file with .csv format

By default, tFileOutputDelimited uses a semi-colon (Smiley Wink for the delimiter. If you save the file as a .csv, then open it in Excel, it expects the delimiter to be a comma, and you will see all your data in one cell. Try changing the delimiter in the component to a comma and see if that fixes the problem.

All Replies
Seven Stars

Re: output file with .csv format

Hi,

 

A cell is not plain text csv. Do you mean to output to Excel (tFileOutputExcel) or do you mean outputting a readable format like with tFileOutputPositional?

 

-----------------------------------------------------------------------------------------------------------
When you like my answer, please accept it as solution and send some kudos
Eight Stars

Re: output file with .csv format

By default, tFileOutputDelimited uses a semi-colon (Smiley Wink for the delimiter. If you save the file as a .csv, then open it in Excel, it expects the delimiter to be a comma, and you will see all your data in one cell. Try changing the delimiter in the component to a comma and see if that fixes the problem.
Four Stars

Re: output file with .csv format

I meant for csv file to look like the example I have mentioned. I think tFileOutputPositional will not fulfill my requirement.

Four Stars

Re: output file with .csv format

Thanks..!!!

 

This solved my problem.

Four Stars

Re: output file with .csv format

Hi,

 

Choosing comma as delimeter solved my problem. But, if the input data column has comma in it, it is treating as seperate data. I mean if the data is like ABC, DEF which is a single string is treated as two different columns.

 

 

Can I get solution to this?

 

Thanks,

Suneel.

Ten Stars

Re: output file with .csv format

If the input file is properly wrapping data elements that contain the delimiter in quotes or some other enclosing character(s) in the "Text enclosure" setting of tFileInputDelimited.

For a standard quote enclosure, I use "\"" as my setting.

If your input file does not enclose text strings containing a delimiter, this is an error that will need to be addressed at the source of the file.

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.