Bulk Creation Of Items In Sitecore

1.6k views Asked by At

I am using Sitecore 8, Update 3.

I am attempting to bulk create a couple thousand items that use a custom template. All of these items are created under one specific parent item.

The custom template has two fields which are Path [Single-Line Text] and Target [General Link].

The source of the data is in an old SQL database.

Is there a way to do this?

3

There are 3 answers

4
Jan Bluemink On BEST ANSWER

The Sitecore marketplace module Data Importer is a option for you.

Create a custom importer with the sitecore api is also possible, to speed up, you can disable the index rebuild.

0
Ian Graham On

In these scenarios you normally end up writing code to call the api and create the items programmatically rather than doing a generic import.

If you need to create a large amount of items I would recommend writing a console app to do this. You could use the Sitecore Item Web api to create items outside of the Sitecore context or investigate the new Entity Service api in Sitecore, both will be capable of creating large amounts of Sitecore items.

http://mikerobbins.co.uk/2015/01/06/entityservice-sitecore-service-client/

https://sdn.sitecore.net/upload/sdn5/modules/sitecore%20item%20web%20api/sitecore_item_web_api_developer_guide_sc65-66-usletter.pdf

If these don't float your boat you could always write async code to create the Sitecore items and have that executed by an aspx page in a Sitecore instance - works well for one off tasks.

Example of Asynchronous page processing in ASP.net webforms (.NET 2.0)

0
jammykam On

Since your data is already in SQL Serve, you should take a look at using the SSIS Components for Sitecore, it was designed for importing exactly this kind of data in bulk into Sitecore using ETL.

You can find more info in the blog post Creating your first project with SSIS Components for Sitecore and there is also some good additional into in the Migrating to Sitecore: Going from WordPress to Sitecore with SQL Server Integration Services (SSIS) post.

The Integration Services Components for Sitecore is available on the Sitecore Marketplace, and it is compatible with Sitecore XP8.

I'll also add, if you are creating anything more than 100 items below a single parent item then this is not recommended Sitecore practice unless the items sit within an Item Bucket. Make sure you account for this, or split your items up into smaller sub-folders (e.g. year/month folders for news article type items)