--- alias: master-data-packages-admin description: "This documentation guides users through creating, editing, and loading Master Data Packages for bulk data import into a manufacturing MES" --- # Master Data Packages :lock: Administration.**MasterDataPackages** ## Overview Master Data Packages are used to load data into a Critical Manufacturing MES environment through the use of packages, allowing any authorized user to bulk load data into the system. The **Master Data Packages** page is available in the Administration page group. The list displays packages from newest to oldest. ![Master Data Packages list view showing all packages with status and details](images/master_data_package_list.png) !!! note Download Template on the top ribbon provides direct access to an empty Master Data Template. You can find specific features, formats, and configurations of the packages that can be used in this section in [[master-data-packages-tutorial]]. ## Details Tab Opening a specific Master Data Package will display information relevant to the entity. Selecting :material-download: in the Master Data section will allow you to download the actual package and edit it before loading it into the system. ![Master Data Package Details tab showing package information and download option](images/master_data_package_details.png) {% include-markdown 'includes/views/details_view.md' %} * **Details** - displays general information on the Master Data Package. * **Objects** - displays the list of objects loaded from the package file uploaded into the system and that have undergone at least one procedure of Load or Validate performed on the Master Data Package. * **Attachments** - shows the documents that are attached to the Master Data Package and enables you to attach additional documentation to it. In the **Details** sub-section, the **Source** field identifies how the **Master Data Package** was created or imported: * **User** - the package was created or updated through the GUI. This is the default source, when you import a package. * **Global Data Orchestrator** - the package was imported by the [Global Data Orchestrator](https://portal.criticalmanufacturing.com/Help/global-data-orchestrator/) service. The service sets the source and supplies the Transport Package and deployment properties. For packages imported by the Global Data Orchestrator, the **Global Data Orchestration** panel displays the following information: * **Transport Package** - Name of the **Transport Package**. * **Version** - Version of the **Transport Package**. * **Checksum** - Checksum of the **Transport Package**. * **Customer Environment** - Customer Environment that created the **Transport Package**. * **Deployment Plan Instance** - The **Master Data Deployment Plan Instance** associated with the package deployment. * **Deployment Plan** - The **Master Data Deployment Plan** associated with the package deployment. * **Deployment User** - User associated with the package deployment. * **Deployment Date** - Date and time of the package deployment. ![Master Data Package with Source set to Global Data Orchestrator and transport package and deployment information on the right](images/master_data_package_global_data_orchest.png) ## Execution Tab This tab shows the results of the previous execution, regardless of whether the data was loaded or validated. It displays the list of Entity Types of the last execution of the specific Master Data Package and it is only available when there has been at least one procedure of Load or Validate performed on the Master Data Package. ![Master Data Package Execution tab showing results and status of package operations](images/master_data_package_execution.png) ## Package format File formats accepted are: `.zip`, `.xlsx`, `.xml`, `.json`. The base path for the location of the entities to be loaded is considered as the root folder of the `.zip` file. As a quick example, consider the following entry of a Master Data Package Excel file: ![Mdpackage location example showing file structure](images/mdpackage_location.png) For the system to be able to access and process the `sample.pdf` file, it must be placed inside a `documents` folder, which will have to be located in the root of the `.zip` file or at the same level as the `.xlsx` file: ![Mdpackage folder structure example showing documents folder in root directory](images/mdpackage_example.png) Additionally, it is not possible to upload multiple Master Data files through a single `.zip` folder. If your root folder, which represents the Master Data Package, has multiple valid files, only one will be processed as Master Data and its selection is random (the first valid file). This means that you have no way of selecting which file will be loaded as the Master Data file. Therefore, any extra files that are to be used in the Master Data file itself must be contained in sub-folders and be duly referenced in the Master Data file: ![Mdpackage example2](images/mdpackage_example2.png) In the eventuality that all `.xlsx` and `.json` files are tried and there is no valid file, the system will return and error with the last attempted file. More information on [[master-data-packages-tutorial]], where you can also find a sample of the Master Data File. ## Creating a Master Data Package :lock: MasterDataPackage.**Create** To create a **Master Data Package** in the application, open the **Master Data Packages** page and select **New** on the ribbon. Cloning a **Master Data Package** is not supported. ### Step 1: General Data 1. Provide the name for the Master Data Package. 2. Optionally, provide a description. 3. Select the Master Data Package type. The list of possible values is taken from the lookup table `MasterDataPackageType`. 4. Select the file to upload by dragging it from the file explorer or by using Browse Files and selecting a file manually. Your file can be: * A duly populated MasterData.xlsx template: ![Step 1 of Create Master Data Package showing populated MasterData.xlsx template with sample data](images/mdpackage_template_example.png) * A `.zip` folder if you want to load objects such as documents, queries and other: ![Master Data Package zip folder structure with documents subfolder at root level](images/mdpackage_example2.png) !!! note When using `.zip` folders you must reference objects correctly in the **RelativeFileLocation** column of your MasterData.xlsx: ![Master Data Package example showing RelativeFileLocation column configuration](images/mdpackage_relfileloc1.png) ![Master Data Package showing file path references in RelativeFileLocation field](images/mdpackage_relfileloc2.png) 5. File information will be displayed on screen after the file is loaded and analyzed by the system. Selecting :material-trash-can: on the right hand side of the entry will remove the file from the import queue. 6. Select **Create** to save the new Master Data Package. ![Create Master Data Package dialog with file upload and package details form](images/create_master_data_package.png) ## Editing a Master Data Package :lock: MasterDataPackage.**Edit** The **Master Data Package** must be **Active**, its **System State** must be **Not Processing**, and its **Source** must be **User**. To edit a Master Data Package, you need to: 1. Open the Master Data Package page. 2. Open the wizard by selecting **Edit** on the action bar. 3. Make the necessary changes and save them by selecting **Edit**. ![Edit Master Data Package dialog showing editable package fields](images/edit_master_data_package.png) ## Terminating a Master Data Package :lock: MasterDataPackage.**Terminate** To terminate a Master Data Package, you need to: 1. Open the Master Data Package page. 2. Select **Terminate** in the top ribbon. 3. Confirm the details and select **Terminate** to remove the Master Data Package. ![Terminate Master Data Package confirmation dialog with package removal option](images/terminate_master_data_package.png) ## Validating a Master Data Package :lock: MasterDataPackage.**Validate** To validate a Master Data Package and assert the correctness of the values, the Master Data Package exists, it is Active and the System State is Not Processing. The steps to load the package are described below: 1. From the main Details page of the Master Data Package, select the **Run** drop down on the action bar and select **Validate**. 2. The system will open a dialog where you can see the Entity Types available from the loaded package file. Select which of the entity types should be loaded into the Critical Manufacturing MES system and select **Validate** to start the process. ![Validate Master Data Package dialog showing validation process and entity selection](images/validate_master_data_package.png) ## Loading a Master Data Package :lock: MasterDataPackage.**Load** To Load a Master Data Package, the Master Data Package exists, it is Active and the System State is Not Processing. The steps to load the package are described below: 1. From the main Details page of the Master Data Package, select the **Run** drop down on the action bar and select **Load**. 2. The system will open a dialog where you can see the Entity Types available from the loaded package file. Select which of the entity types should be loaded into the Critical Manufacturing MES system and select **Load** to start the process. ![Load Master Data Package dialog showing entity types selection and load process](images/load_master_data_package.png) !!! info The System State of the Master Data Package will be set to Processing during loading, and will move back to Not Processing after completing the process. The status of the execution can be seen in real time on the main screen (and on the left sidebar) when the package is loading: | Operation result | Visual example | |-----------------------|---------------------------------------------------------------------------| | Waiting to run | ![Master Data Package load status showing waiting state](images/load_master_data_package_waiting.png) | | Running | ![Master Data Package load status showing running operation](images/load_master_data_package_running.png) | | Finished successfully | ![Master Data Package load status showing successful completion](images/load_master_data_package_completed.png) | | Error | ![Master Data Package load status showing error condition](images/load_master_data_package_error.png) | Table: Execution status for Master Data Package Load !!! note When using Load, the execution will stop if any error is raised throughout the procedure, resulting in the following possible scenarios: | Procedure result | Data loading | |---------------------------|---------------------------------| | No error raised | All data loaded into the system | | At least one error raised | No data loaded into the system | Table: Execution results for Master Data Package Load ### Revision State on Import The following settings only apply when the **Global Data Orchestrator** loads a **Master Data Package** into the destination environment as part of a **Change Package** deployment. When a **Master Data Package** creates a revision of a versioned object during loading, the **Entity Type** configuration in the destination environment determines its initial revision state: * **New State For First Revision** applies when the import creates the first revision of an object. * **New State For Next Revisions** applies when the import creates another revision of an existing object. If the applicable setting is Pilot, the system creates the revision in the Pilot state. Otherwise, it creates the revision in the Active state. These settings apply to newly created revisions, not to updates within an existing revision. For configuration details, see [[user-guide-entity-types]]. A Pilot revision can be selected and referenced by other objects. It allows local qualification of imported data without replacing an Active revision with an Effective version as the default. If no Active revision has an Effective version, the system selects, as the Default Revision, the Pilot revision with an Effective version and the highest sequence. For the complete default-selection rules, see [[user-guide-manage-default-revisions]]. After local qualification, you can mark the revision as Active. This recalculates the default revision; it does not necessarily make that revision the default. For more information, see [[user-guide-mark-as-pilot-and-active]].