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
NIFI-10067 enable use of script, dynamic_templates and _bulk headers for PutElasticsearchJson/Record processors #6628
Conversation
6718170
to
903f3f7
Compare
Are you planning to update the |
I don't believe there's anything that needs doing - the processor accepts arbitrary json as the "query" and sends that to elasticsearch, so you can already provide a Or have you tried it and found something not working/you think could be improved? Hopefully all that's left for this PR now is a rebase and finishing the additional docs for the PUT processors to describe the new user of dynamic properties to populate the bulk api request headers |
My vision for that processor would be a query builder that allows you to break down the process. Ex specifying the script or script id and then the update query. That combined with the ability to just use the flowfile body as a raw document to punt to update_by_query. |
That (to me) sounds like a (potentially breaking) change to the processor's API, best left to another ticket/discussion I'm happy to update the existing processor's documentation to clarify that the |
8eb0329
to
4afda58
Compare
4afda58
to
bab380d
Compare
@MikeThomsen FYI I raised NIFI-11016 to cover your future update to the |
9e6ff72
to
2de7ff5
Compare
2de7ff5
to
a757ca2
Compare
a757ca2
to
ffede7e
Compare
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.
Thanks for this improvement, @ChrisSamo632. A couple minor naming suggestions, and then I'd like to test this out.
|
||
static final PropertyDescriptor DYNAMIC_TEMPLATES = new PropertyDescriptor.Builder() | ||
.name("put-es-json-dynamic_templates") | ||
.displayName("Script") |
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.
I think this is a copy/paste error
@@ -190,6 +201,26 @@ public class PutElasticsearchRecord extends AbstractPutElasticsearch { | |||
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) | |||
.build(); | |||
|
|||
static final PropertyDescriptor SCRIPT_RECORD_PATH = new PropertyDescriptor.Builder() | |||
.name("put-es-record-script-path") | |||
.displayName("script Record Path") |
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.
Perhaps capital S
A community member has asked on Slack whether this change can also incorporate the option for scripted_upsert. Options to set this flag for the |
ffede7e
to
f4f0bb0
Compare
|
…rch via PutElasticsearchJson or PutElasticsearchRecord NIFI-3262 enable use of dynamic_templates in Elasticsearch _bulk operations NIFI-3262 enable use of bulk header fields in Elasticsearch _bulk operations via BULK: dynamic headers in PutElasticsearchJson and PutElasticsearchRecord
…ElasticsearchRecord processors
35760bf
to
0699c68
Compare
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.
Ok, I tested out the latest changes -- thanks for the updates! I'll go ahead and merge.
…arch via PutElasticsearchJson or PutElasticsearchRecord NIFI-3262: enable use of dynamic_templates in Elasticsearch _bulk operations Signed-off-by: Joe Gresock <jgresock@gmail.com> This closes apache#6628.
…arch via PutElasticsearchJson or PutElasticsearchRecord NIFI-3262: enable use of dynamic_templates in Elasticsearch _bulk operations Signed-off-by: Joe Gresock <jgresock@gmail.com> This closes apache#6628.
…arch via PutElasticsearchJson or PutElasticsearchRecord NIFI-3262: enable use of dynamic_templates in Elasticsearch _bulk operations Signed-off-by: Joe Gresock <jgresock@gmail.com> This closes #6628.
Summary
NIFI-10067 enable use of script when updating documents in Elasticsearch via PutElasticsearchJson or PutElasticsearchRecord
NIFI-3262 enable use of dynamic_templates in Elasticsearch _bulk operations
NIFI-3262 enable use of bulk header fields in Elasticsearch _bulk operations via BULK: dynamic headers in PutElasticsearchJson and PutElasticsearchRecord
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy[ ] New dependencies are documented in applicableLICENSE
andNOTICE
filesDocumentation