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

[PLUGIN-1867] Error management changes for CSV parser #1945

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

psainics
Copy link
Contributor

@psainics psainics commented Feb 20, 2025

Description
Error Management for CSVParser transform plugin exceptions
https://cdap.atlassian.net/browse/PLUGIN-1867

Code change
Modified CSVParser.java

Tests
Test Case - tested with valid and invalid scenarios

1. Success

Screenshot 2025-02-20 at 4 25 00 PM

2. Missing CSV values

Screenshot 2025-02-20 at 7 13 34 PM Screenshot 2025-02-20 at 7 13 45 PM ![Uploading Screenshot 2025-02-20 at 7.14.03 PM.png…]()

3. Empty CSV values

Screenshot 2025-02-20 at 4 22 03 PM Screenshot 2025-02-20 at 4 22 16 PM Screenshot 2025-02-20 at 4 22 42 PM

@psainics psainics added the build Trigger unit test build label Feb 20, 2025
@psainics psainics self-assigned this Feb 20, 2025
@psainics psainics marked this pull request as ready for review February 20, 2025 12:56
Comment on lines 235 to 237
String error = String.format("Number of values are not as per output schema. " +
"Expected %d values, but found only %d values", fields.size(), record.size());
throw ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be great if we can log the whole record here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Trigger unit test build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants