data-importer
data-importer copied to clipboard
[Improvement]: Missing type FieldCollection in TransformationDataTypeService
Improvement description
Currently, the TransformationDataTypeService in the Pimcore Data Importer does not recognize or support the FieldCollection data type. This limitation makes it difficult to build flexible and reusable transformation pipelines that involve mapping structured array data into Field Collections.
Proposed Improvement:
Add support for FieldCollection as a valid transformation data type within TransformationDataTypeService. This would allow developers to:
Use FieldCollections in custom transformers or generic ones like asDataFieldCollection
Dynamically convert array-based JSON input to properly-typed FieldCollections
Enhance compatibility with object bricks and structured nested data import workflows
Use Case Example:
{
"data_field_collection": [
{ "data_key": "WA", "data_value": 92 },
{ "data_key": "JS", "data_value": 90 }
]
}
Developers should be able to configure a transformation pipeline that maps the above structure to a FieldCollection of data_field_collection elements.
Benefits:
More robust and extensible data import workflows
Improved developer experience with nested object structures
Aligns with Pimcore's flexible data modeling system
Suggested Implementation:
Add fieldcollection as a supported type in TransformationDataTypeService::FIElD_COLLECTION
Validate the handling of this type in transformation pipelines
I like the idea, but realistically it won't make it to our roadmap anytime soon 🫤. We would review a PR though.
Hi @fashxp. I did it my own project and importing successfully with field has type FieldCollection. I will create a PR soon.