Added array support for ndjson inputcodec#5875
Conversation
KarstenSchnitter
left a comment
There was a problem hiding this comment.
Thanks for providing this change. Looks good to me.
dlvenable
left a comment
There was a problem hiding this comment.
Thank you @sivagnanam-arumugam for this contribution!
The DCO check is failing: https://github.com/opensearch-project/data-prepper/pull/5875/checks?check_run_id=45354977732
| void parse_with_array_of_objects_asserts_number_of_objects() throws IOException { | ||
| final NdjsonInputCodec objectUnderTest = createObjectUnderTest(); | ||
|
|
||
| final String jsonArray = "[{\"key1\":\"value1\"},{\"key2\":\"value2\"}]"; |
There was a problem hiding this comment.
Does this change support reading multiple arrays from different lines?
[{\"key1\":\"value1\"},{\"key2\":\"value2\"}]
[{\"key3\":\"value3\"},{\"key4\":\"value4\"}]
If so, we should test this too.
There was a problem hiding this comment.
Added multiple array support and added unit test cases.
Added signed-off-by commit message.
Signed-off-by: sivagnanam-arumugam <sivagnanam.arumugam@freshworks.com>
Added test cases for multiple array support Signed-off-by: sivagnanam-arumugam <sivagnanam.arumugam@freshworks.com>
27c9f6e to
366f512
Compare
dlvenable
left a comment
There was a problem hiding this comment.
Thank you @sivagnanam-arumugam for this contribution and follow up changes!
@KarstenSchnitter , Would you like to take another look?
KarstenSchnitter
left a comment
There was a problem hiding this comment.
Still looks good to me. Thanks for the contribution.
Description
Array support for ndjson input codec,
Array line is handled in logstash json_lines codec, So added the support to data prepper.
Issues Resolved
Resolves #5874
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.