False positive "mappings defined at top level" error triggered unconditionally in ElasticSearchDatasetPipeline constructor

Created on 13 August 2025, about 2 months ago

Problem/Motivation

The ElasticSearchDatasetPipeline plugin currently triggers an error message in its constructor unconditionally, warning that:

Mappings that are defined at the top level of your pipeline will no longer take effect. Please place them under:
destinationSettings:
  elasticsearch:
    mappings:
      ...

However, this warning is displayed regardless of whether mappings are actually defined at the top level or correctly placed under destinationSettings.elasticsearch.mappings. This causes confusion because the error appears even when the configuration is valid.

Steps to reproduce

1. Define Elasticsearch mappings correctly under:

destinationSettings:
  elasticsearch:
    mappings:
      properties:
        field_name:
          type: keyword

2. Run the pipeline or trigger the constructor.
3. The warning message about deprecated top-level mappings appears regardless.

Proposed resolution

Add a check in the constructor to detect if top-level mappings are actually set and destinationSettings.elasticsearch.mappings are empty before triggering the warning.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇺Australia Nadim Hossain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024