3

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?

eat-sleep-code
  • 4,753
  • 13
  • 52
  • 98
  • It might be worth considering using an item bucket to store your items as it is not recommended to store this many items beneath a single parent item in sitecore https://doc.sitecore.net/sitecore%20experience%20platform/managing%20items/item%20buckets – geedubb Jun 28 '15 at 11:15
  • @geedubb I believe I will be taking the "bucket" route, once I get the import all ironed out. – eat-sleep-code Jun 29 '15 at 15:17

3 Answers3

2

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.

Jan Bluemink
  • 3,467
  • 1
  • 21
  • 35
  • That module would be perfect. But, it was never updated to work with Sitecore 8. So you can get through all the steps, and discover there is no menu item in the Developer Tools to kick off the import. There was a menu item in the core database, but it doesn't actually get rendered into the menu. – eat-sleep-code Jun 26 '15 at 19:56
  • You can import on a older Sitecore, and package. (if it is a one time action) – Jan Bluemink Jun 26 '15 at 20:19
  • In these circumstances you basically end writing your own code – Ian Graham Jun 26 '15 at 21:24
  • Actually got this module working without the developer tools option. – eat-sleep-code Jun 27 '15 at 02:28
2

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)

jammykam
  • 16,940
  • 2
  • 36
  • 71
1

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)

Community
  • 1
  • 1
Ian Graham
  • 3,206
  • 1
  • 15
  • 23