Importing and exporting data
This section lists the best practices recommended to optimize importing, exporting, or migrating your data within Sitecore Content Hub.
Import and export Content Hub data
Import and export configuration data
-
When you export portal pages, make sure to include publish definition configurations, entity definitions, and taxonomies. Avoid exporting portal pages referencing entity definitions that are not exported.
-
When you import or export changes to entity definitions, make sure to include:
-
Export profiles, if modified.
-
Portal pages.
-
Publish definition configurations.
-
Taxonomies. If you've added new taxonomy definitions, make sure to also export taxonomies with existing values.
-
Policies, including security policies and referenced entity definitions or taxonomies. For example, you might want a user group to access all assets linked to ProductLineToAsset that have the value of X.
-
Importing a lot of entity definitions that require reindexing might cause a large number of graph messages.
Import and export state flows
When you export state flows, make sure to include:
-
Entity definitions - if state flows are enabled for a definition, also export that definition.
-
Publish definition configurations - always export together with entity definitions.
-
Portal pages - state flow actions are usually added when a new state flow is added.
-
Policies - policies and User-to-User-group assignments are usually updated when a state flow is defined. Be sure to include all taxonomies that are referenced by the policies.
-
Triggers - triggers are usually required to initiate a state flow only when a condition is met. Always include the trigger conditions and all scripts linked to the triggers.
If you have state flows with active triggers in the target environment, be aware that these triggers will activate during package imports if certain conditions are met. For instance, if you have a trigger set up for newly created or updated asset types, and your package includes a new asset type, that trigger will run when the package is imported.
Migrate option list to taxonomy
To migrate an option list to a taxonomy:
-
Create a taxonomy and add values.
ImportantDon't rename the automatically generated identifier. Instead, keep DefinitionName.TaxonomyName as the identifier for each taxonomy value.
-
Create a relation between the taxonomy and your target entity definition.
-
Export the resulting entities to Excel, making sure to include the option list property and the new relation.
-
Ensure your target environment uses the same option list values. Then, use the API to share the taxonomy values and details on how to create relations in your target environment.
-
If you need to secure your entities based on this new taxonomy, review and update the user groups and their policies.
-
Update the portal pages and their components to add the new taxonomy value. For example, you need to remove the option list value from the advanced search feature of the Search component, and you might need to add taxonomy as a filter.
-
Open the exported Excel file and add the identifiers of the new taxonomy values to your entities, then remove the option list values.
-
Import the Excel file.
-
To validate the mass edit operation, query the entities with the option list values to check that no entities are linked to them.
-
Remove all properties that reference this option list from the applicable entity definitions.
-
Delete the option list and its values.
Migrate taxonomy to option list
To migrate a taxonomy to an option list:
-
Create the option list member in your target entity definition.
-
Export your entities to Excel, making sure to include the new option list and the new taxonomy relation in the export profile.
-
Ensure your target environment uses the same taxonomy values. Then, use the API to share the option list values and details on how to create relations in your target environment.
-
If the security rules are using the taxonomy definition, review the applicable user groups and user group policies to delete all referrals.
-
Update the portal page components to add the option list values. For example, you might need to add the option list to the Search component as a facet, or display it in the output.
-
Open the exported Excel file and the add new option list values to your entities, then remove the taxonomy values.
-
Import the Excel data in batches containing no more than 2,000 rows each.
-
Delete the taxonomy and its values.