Skip to content

Enhancement: Enable batching for SharePoint List Item creation #1203

@garrytrinder

Description

@garrytrinder

The spo listitem add command should allow users to create multiple SharePoint List Items without having to execute the same command multiple times.

If you need to create a couple of items this most likely is not an issue but we should consider scenarios where hundreds or even thousands of items need to be created. At the moment the automation script required to perform this action would run into hundreds and thousands of lines.

To address this issue, it is proposed that a new command be created under 'spo listitem' called 'batch' with a sub commands for add, i.e. spo listitem batch add, that takes a definition file (initially txt or csv) as an input which describes each item to be created when the command is executed.

Example: spo listitem batch add --path listitems.csv

This approach would then allow us to further expand the batch command with more sub commands to cover remove, update and get should the need arise.

Once the approach is validated, we could implement it on other types like file, list, field, file, etc.

Based on research by @waldekmastykarz using the Microsoft Graph batched requests would provide the best performance, therefore we should look to use this in our implementation.

Source: https://blog.mastykarz.nl/fastest-way-create-sharepoint-list-items/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions