Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [Source.LocalFile] issue about line break and double qutotation for csv file #8444

Open
2 of 3 tasks
yinrui97 opened this issue Jan 3, 2025 · 0 comments
Open
2 of 3 tasks
Labels

Comments

@yinrui97
Copy link

yinrui97 commented Jan 3, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Issue1

When reading csv file, if one field contains line break \n and this field is encapsulated by double quotation. see below example

field1, field2,   "field3_a xxxxx
\n. field3_b yyy", field4 ...

Seatunnel can not handle such case and just report exception when reading such line. If a field is encapsulated by double quotation mark, seatunnel should ignore the line break for this field.

Issue2

If a field is encapsulated by double quotation mark in a line, after seatunnel reading the line, it can recognize the double quotation mark, see below example, a line has 4 fields

field1, field2, "field3 xxxxx, field3 yyyyy", field4

But when seatunnel writes the line in the sink csv file, the the double quotation mark is missing, see below example, , this line has 5 fields, this is wrong

field1, field2, field3 xxxxx, field3 yyyyy, field4

SeaTunnel Version

2.3.8

SeaTunnel Config

This is a common issue, nothing to do with Seatunnel Config.

Running Command

This is common issue, very easy to reproduce.

Error Exception

Issue1 has error exception, but issue2 has no error exception.

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@yinrui97 yinrui97 added the bug label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant