Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 3.13 KB

File metadata and controls

78 lines (59 loc) · 3.13 KB

User ingester command

UserIngesterCommand is responsible for ingesting user data into the application.

Usage

$ sudo -u www-data bin/console roster:ingest:user <path> [--storage=local] [--delimiter=1000] [--batch=1000]

Main arguments

Argument Description
path Relative path to the file [example: var/users.csv]

Main options

Option Description
-s, --storage Filesystem storage identifier [default: local] More information can be found here.
-d, --delimiter CSV delimiter [default: ,]
-b, --batch Batch size [default: 1000]
-f, --force To apply database modifications or not [default: false]

For the full list of options please refer to the helper option:

$ sudo -u www-data bin/console roster:ingest:user -h

CSV file format

Here is an example csv structure:

username,password,groupId
user_1,password_1,group_1
user_2,password_2,group_2
user_3,password_3,group_2
user_4,password_4,group_3
Column Description
username Unique identifier of the user.
password Plain password of the user (will be encoded during ingestion).
groupId For logical grouping of the users (optional, depends on chosen LTI load balancing strategy.)

Related environment variables

Variable Description
DATABASE_URL Database connection string. Supported formats are described here.

Examples

Ingesting users from default (local) storage with custom batch size:

$ sudo -u www-data bin/console roster:ingest:user /path/to/file.csv --batch=10000 --force

Ingesting users from default (local) storage with custom column delimiter (;):

$ sudo -u www-data bin/console roster:ingest:user /path/to/file.csv --delimiter=; --force

Ingesting users from a custom storage:

$ sudo -u www-data bin/console roster:ingest:user /path/to/file.csv --storage=myCustomStorage --force

For configuring custom storages, please check the Storage registry documentation.