# How to upgrade a DSD 

The "Upgrade DSD" function can be found in the menu on the left under "Data Manager" and allows the user to update the version of a DSD used in a Cube. \
By selecting this item from the menu, it will show all the DSDs with at least one associated Cube.

![Update a DSD](_static/img/aggiorna_dsd_1.png "Update a DSD")

At line level on the right, icons are present for:
- *View the DSD*
- *View the associated Dataflows*
- *Upgrade the DSD*

By clicking on the "Upgrade DSD" icon the System opens a window where the user can select the target DSD needed for the upgrade. On the line of the DSD the user wants to select, there are two buttons which allow
comparison between this DSD and the orginal one, and the actual selection of the cubes the user is intended to upgrade.

![DSD useful for updating](_static/img/aggiorna_dsd_2.PNG "DSD useful for updating")

Once this last button is pressed, the cubes to be updated (among those that use this DSD) will be all selected by default.

![DSD cube selection](_static/img/cube_selection.PNG "DSD cube selection")

If the user selects the comparison button, the system shows a report with the results of the comparison between the two DSDs. This comparison can be downloaded in a report with the "Download" button.

![Compare DSD](_static/img/aggiorna_dsd_3.png "Compare DSD")

The "Update DSD" icon updates the DSD in all connected objects, e.g. if a Cube was created with the DSD: DCISPOP-IT1-1.2, after updating the DSD to version 1.3 the Cube will be associated with DSD: DCISPOP-IT1-1.3. \
If the DSD chosen for the update does not meet the minimum requirements (e.g. there is no mandatory dimension or attribute) the update 
is blocked with an error message.

![DSD update error](_static/img/aggiorna_dsd_4.png "DSD update error")

Using the Upgrade DSD functionality forces the re-creation of the dataflows for which the cube was upgraded due to the dsd upgrade. \
Existing categorizations in the categorization schema themes are also recreated exactly as they were when the upgrade was initiated.


If categorization creation fails, the entire dataflow will still appear among those successfully upgraded but a message will be shown in 
the report indicating that categorization creation has failed.