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]: the csv resolving bug on CSVToBigQuery template #1764

Open
OpensourceHU opened this issue Aug 1, 2024 · 0 comments
Open

[Bug]: the csv resolving bug on CSVToBigQuery template #1764

OpensourceHU opened this issue Aug 1, 2024 · 0 comments
Labels
bug Something isn't working needs triage p2

Comments

@OpensourceHU
Copy link

Related Template(s)

CSVToBigQuery

Template Version

2024-07-16-00_rc00

What happened?

the csv file resolving will encounter error: "Number of fields in the schema and number of Csv headers do not match."
when csv file fieds has comma in text, for example ,if a we have two field ,field2 is a json string
{field1},{field2}
field1Text,"{""key1"":"value1"",""key2"":"value2""}"
the spiliter will split it to 3 column , which number is not match with the csv header and bq schema, and this row will transform failed.
the problem probably in line 199 of CSVToBigQuery.java
Splitter.on(delimiter.get()).splitToList(context.element()).toArray(new String[0]);
please consider use csv utils package to fix this bad case

Relevant log output

Number of fields in the schema and number of Csv headers do not match.
@OpensourceHU OpensourceHU added bug Something isn't working needs triage p2 labels Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage p2
Projects
None yet
Development

No branches or pull requests

1 participant