Header mappings

  • It is strongly recommended that, by default, the value for custom-configuration-dir is <magento-install-directory>/app/etc/configuration

  • As soon as a default configuration is copied, changed, extended, or modified and stored under the path specified in custom-configuration-dir, only this configuration takes effect and always overwrites the original configuration

  • The configuration handling is mainly based on the PHP framework Symfony, and therefore unexpected effects maid occur in different configuration constellations

    • Consequently, it is always recommended to test modified configurations concerning unwanted side effects

It is often helpful to map column names to the corresponding attributes.

The header mapping i a built-in feature and can get configured by adding a custom snippet, e.g. <custom-configuration-dir>/header-mappings.json, which contains an array of header mappings like

{
  "header-mappings": {
    "catalog_product": {
      "my_sku_column": "sku",
      "my_qty_column": "qty",
      ...,
    }
  }
}

The column name my_sku_column is automatically mapped to the mandatory column SKU in the above example.

The mapping gets done before the column is processed and allows vendors to configure each column with the corresponding attribute without custom programming.

The header mappings for all operations in the configuration file must be valid