protected function saveCategoryAttributes(array $attributesData)
    {
        $entityFieldName = 'entity_id';
        if ($this->categoryImportVersionFeature) {
            $entityFieldName = $this->categoryImportVersionFeature->getEntityFieldName();
        }

        $entityIds = array();

        foreach ($attributesData as $tableName => $data) {
            $tableData = [];

            foreach ($data as $entityId => $attributes) {
                $entityIds[] = $entityId;

                foreach ($attributes as $attributeId => $storeValues) {
                    foreach ($storeValues as $storeId => $storeValue) {
                        $tableData[] = [
                            $entityFieldName => $entityId,
                            'attribute_id' => $attributeId,
                            'store_id' => $storeId,
                            'value' => $storeValue
                        ];
                    }
                }
            }

            $this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
        }

        $entityIds = array_unique($entityIds);
        foreach ($entityIds as $entityId) {
            $this->reindexUpdatedCategories($entityId);
        }


        return $this;
    }