Skip to content

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

@MrAladdin

Description

@MrAladdin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions