PHPackages                             wwwision/import-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wwwision/import-service

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

wwwision/import-service
=======================

Generic service for importing data from different sources to configurable targets such as the Neos Content Repository or an arbitrary database table

3.0.1(2y ago)1011.0k5[2 issues](https://github.com/bwaidelich/Wwwision.ImportService/issues)[1 PRs](https://github.com/bwaidelich/Wwwision.ImportService/pulls)MITPHPPHP ^8.1

Since Jul 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bwaidelich/Wwwision.ImportService)[ Packagist](https://packagist.org/packages/wwwision/import-service)[ Fund](https://www.paypal.me/bwaidelich)[ GitHub Sponsors](https://github.com/bwaidelich)[ RSS](/packages/wwwision-import-service/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (3)Versions (12)Used By (0)

Wwwision.ImportService
======================

[](#wwwisionimportservice)

Neos Flow package for importing data from different sources to configurable targets such as the Neos Content Repository or an arbitrary database table

Usage
-----

[](#usage)

### Setup

[](#setup)

Install this package using composer via

```
composer require wwwision/import-service
```

### Define an Import Preset

[](#define-an-import-preset)

Add some Import Preset configuration to your projects `Settings.yaml`, for example:

```
Wwwision:
  ImportService:
    presets:

      'some-prefix:some-name':
        source:
          factory: 'Wwwision\ImportService\DataSource\Http\HttpSourceFactory'
          options:
            endpoint: 'https://some-endpoint.tld/data.json'
        target:
          factory: 'Wwwision\ImportService\DataTarget\Dbal\DbalSourceFactory'
          options:
            table: 'some_table'
        mapping:
          'id': 'id'
          'given_name': 'firstName'
          'family_name': 'lastName'
```

### Run the import

[](#run-the-import)

```
./flow import:run some-prefix:some-name
```

Pre-process data
----------------

[](#pre-process-data)

Sometimes the data has to be processed before it is mapped to. This can be done with a `dataProcessor`.

### Example:

[](#example)

#### Implementation

[](#implementation)

A processor is any *public* method of any class that can be instantiated by Flow without additional arguments:

```
