Example control file

A very simple control file for user sync, mapping from a JSON file to the user Destination might look like:

{
    "dataImportControlFileVersion": 0,
    "model": "haplo:user-sync",
    "files": {
        "users": {
            "read": "json",
        }
    },
    "instructions": [
        {
            "source": "ID",
            "destination": "user",
            "name": "username"
        },
        {
            "source": "FIRST_NAME",
            "destination": "user",
            "name": "nameFirst"
        },
        {
            "source": "LAST_NAME",
            "destination": "user",
            "name": "nameLast"
        },
        {
            "source": "EMAIL_ADDR",            
            "destination": "user",
            "name": "email"
        }
    ]
}

An input file compatible with this control file might look like:

[
    {
        "ID": "jbloggs",
        "FIRST_NAME": "Joe",
        "LAST_NAME": "Bloggs",
        "EMAIL_ADDR": "joe@example.org"
    },
    {
        "ID": "jsmith",
        "FIRST_NAME": "Jane",
        "LAST_NAME": "Smith",
        "EMAIL_ADDR": "jane@example.org"
    }
]