What are the differences between Internal IDs and Global IDs? How does this effect exporting and importing of iDashboards entities?
There are two IDs that are used within iDashboards, Internal IDs and Global IDs. There is a need to understand how they each effect the import and export process.
Chapter 17 of the iDashboards Admin Manual details the Import/Export process itself. This article describes the differences between Global and Internal IDs and their role in import /export.
The first ID is the internal ID of the entity (category ID, chart ID, dashboard ID, data source ID, stored procedure metadata, and picklist ID) and the other is the Global ID. The internal ID is specific to the installation and is assigned automatically every time a new entity gets saved. For example, if the last chart in an installation is saved as internal ID 5, the next chart will be saved as internal ID 6.
The Global ID is used exclusively in the Import/Export process. To export an entity you need to supply and save a 'source' Global ID. To do this, select “Manage Global IDs” from the ‘Operation’ dropdown box in the 'Import/Export' sub-tab of the System tab of the iDashboards Admin Module. Only when you supply a Global ID to an entity will it be able to be exported.
The internal ID of the ‘source’ installation is ignored in the .idbar. When an .idbar file gets imported, the 'target' iDashboards server looks at the Global IDs on both the .idbar entities and the existing entities on the 'target' server. If any Global IDs match, the 'target' server overwrites any existing 'target' entity’s properties with the ones from the .idbar. This replaces the original 'target' entity with the newly imported 'source' entity. So, you can see how important it is to check and compare the Global IDs before completing any import if you do not wish to overwrite any existing 'target' entities. The ‘target’ Internal ID will remain unchanged if this replacement occurs. If the Global ID does not match, the entity will get created and a new internal ID will be applied at the ‘target’ installation. The number is based on the last ID number already used. If a chart gets created and the last internal chart ID was 8, the new chart ID will be 9, the next 10 and so on.
A dashboard ID (internal ID) of 14 that is used at the ‘source’ installation does not need to, or have to be the same on the ‘target’ installation. It could be 14 at the 'source' installation and be 248 when imported into the ‘target’ installation. It would be coincidental that the ‘source’ and ‘target' installations share the same internal ID.
Global IDs are assumed to be unique within an entity type; in effect, the same Global ID cannot be assigned to two charts but a chart and a dashboard can have the same Global ID. This means that if a chart on the 'target' server has the same Global ID as a dashboard on the 'source' server, the 'target' chart will not overwrite the 'source' dashboard at import time.
If the name of an entity already exists on the 'target' server, the imported entity will have its name appended with’[x]’ where x is the next sequential number. For example, if a chart named 'MyChart' is imported and that name already exists on the 'target' server, it will still be imported and it will not overwrite the existing chart with the same title. It will instead be saved with a new chart name of 'MyChart'.
- X Platform
- Enterprise Suite