-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add copy ingest processor #11870
Add copy ingest processor #11870
Conversation
Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Gao Binlong <[email protected]>
Compatibility status:Checks if related components are compatible with change 441fde8 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer-rca.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git] |
❌ Gradle check result for d8edaf3: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 0595d7e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Gao Binlong <[email protected]>
❕ Gradle check result for 441fde8: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11870 +/- ##
============================================
+ Coverage 71.43% 71.45% +0.01%
+ Complexity 59407 59376 -31
============================================
Files 4921 4922 +1
Lines 278989 279037 +48
Branches 40543 40550 +7
============================================
+ Hits 199287 199374 +87
+ Misses 63086 63045 -41
- Partials 16616 16618 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaobinlong -- thanks for doing this! I really like this approach.
Can you link to the document issue for the new processor?
LGTM |
Thanks, I've done that, and I'll open a document PR for this processor. |
Anything remaining here? Can we merge? |
Do you want this in 2.x? Backport? |
--------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 6d2d4dd) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
--------- (cherry picked from commit 6d2d4dd) Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
New flaky tests #11974 |
--------- Signed-off-by: Gao Binlong <[email protected]>
--------- Signed-off-by: Gao Binlong <[email protected]>
--------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
This PR adds a new ingest processor called
copy
processor which can copy the whole object from one existing field to another field, this is useful when users want to copy a nested field to the root level and then delete the original field, this cannot be achieved by set processor because it doesn't support copying object, only basic data types are supported. In addition, even though script processor can be used to copy object, but writing painless script is not easy for users. The copy processor provides an easy way to copy object.The usage of copy processor are as follows:
, the result is:
.
Both the
source_field
andtarget_field
support template snippets, and there are three extra parameters:ignore_missing
: if true, exit quietly when source_field doesn't exist or has a empty field path, defaults to falseoverride_target
: if true, override the value of target_field if it already exists, defaults to falseremove_source
: if true, remove the source_field after the copy operation, defaults to falseRelated Issues
#10134
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.