-
Notifications
You must be signed in to change notification settings - Fork 207
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
Create-only actions in OpenSearch bulk requests #1457
Comments
@dlvenable Happy to take on this one if it's ready to be worked. |
@jzonthemtn , Yes, this one is ready to work when you are available. I'll assign it to you. Thanks! |
Hi @dlvenable, I'm working on integration tests for this. It looks like a running OpenSearch is required for the |
Thanks @jzonthemtn ! Yes, you would need to run OpenSearch. You can do this via Docker. I normally run them using the GitHub Actions as a template. Start Docker:
Run the tests:
|
Signed-off-by: jzonthemtn <[email protected]>
This was resolved in #1561 . |
…ct#1561) Signed-off-by: jzonthemtn <[email protected]>
Is your feature request related to a problem? Please describe.
Data Prepper only uses the
index
action of the Bulk API. In some cases, teams want to create only if the document does not already exist. The OpenSearch_bulk
API does support this via acreate
action.Describe the solution you'd like
Create a new
action
property of the OpenSearch sink. The default value will beindex
(this is the current behavior). Pipeline authors can define this value to be eithercreate
orindex
.Data Prepper will send bulk requests with all events using the configured
action
.If OpenSearch responds that the document could not be created because it exists, this document will be dropped without any retry or DLQ. This is a reasonable expectation for pipeline authors who use
create
since their goals are to avoid updating existing documents.Describe alternatives you've considered (Optional)
Data Prepper could key off of values directly in the document to determine if
create
orindex
should be used. This would be somewhat more complicated since pipeline authors would need to define conditions and fallbacks. This approach could be added later if needed. But, the proposed solution should be simpler for pipeline authors.Additional context
In addition to
index
andcreate
, the Bulk API also supportsupdate
anddelete
. The proposal above would allow us to add these in future iterations.The text was updated successfully, but these errors were encountered: