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

When using spark df write es, script content and upsert cannot be executed simultaneously. #2278

Open
MrAladdin opened this issue Nov 6, 2024 · 0 comments

Comments

@MrAladdin
Copy link

1、
"es.write.operation" -> "upsert",
"es.update.script.upsert" -> "true"
"es.update.script.inline" -> "xxx"
When executing df.write.format("org.elasticsearch.spark.sql"), fields in the DataFrame that are not involved in the script cannot be upserted.
2、
"es.write.operation" -> "upsert",
"es.update.script.upsert" -> "false"
"es.update.script.inline" -> "xxx"
When executing df.write.format("org.elasticsearch.spark.sql"), if there is no corresponding ID data in Elasticsearch, it will perform a normal write of all fields. When executed a second time, the script content will be executed.

I understand that when es.update.script.upsert is enabled, the script (field a) and upsert (field b) can be executed in parallel simultaneously. It shouldn't be that only one of script or normal upsert of other fields can be chosen. Sorry, I couldn't find the relevant parameters either. When I tested it with Kibana, it was able to execute in parallel successfully.

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

No branches or pull requests

1 participant