7.4 Edit a Workspace

The Edit Workspace process can be time-consuming, typically may take between 2 to 3 hours. However, if certain scenarios are not carefully considered, the update may encounter failures, leading to unwanted delays. To prevent such setbacks and ensure a seamless update, it is crucial to address these potential issues beforehand.

The possible issue and solution are as follows:
  • Adding Views, Materialized Views, or Triggers without selecting their respective parent tables
    • Issue: If a user adds views, materialized views, or triggers without confirming the selection of their corresponding parent tables, it can lead to the failure of the edit workspace update.
    • Solution: It is essential to verify that all dependent objects, such as Views, Materialized views, and Triggers, have their corresponding parent tables included in the selection before initiating the update process.
  • Manually adding additional tables in the Target Workspace Schema instead of using Workspace functionality
    • Issue: If a user manually creates a table (for example, ABC) in both the Source and Target Schemas, independent of the workspace functionality, and then tries to map it to an existing workspace, the edit process may fail. This would lead to an inconsistency between the Target Schema and Source Schema Database objects.
    • Solution: To resolve this issue you need to sync up the inconsistency between the Workspace Source and Target Database objects, for which you can execute the following API with the respective headers and payload.
      • HTTP Method: POST
      • URL: http(s)://<MMG_BE_HOSTNAME>:<MMG_BE_PORT>/<MMG_CONTEXT_NAME>/dmm-service/v1/modelupload/dbcatalog
      • Header Parameter:
        • ofs_workspace_id: MMG Workspace Code.
        • ofs_remote_user: Login User of the application.
        • locale: Locale in languageCode-countryCode format. The values should be en-US.
        • ofs_service_id: Target Workspace Data Store Name.
        • ofs_connection_type: Connection type and the value shoule be OFSAA-DATA.
      • Payload:
        • Case 1: This will retrieve all table definitions, and since the list is empty, it will fetch all tables, making the process time-consuming.
          {	
          
              		"tableNames":[]
          
          	}
        • Case 2: This will retrieve only the tables specified in the request body. If you want to include specific tables, ensure they are listed.
          {
          
              		"tableNames":["A","B"]
          
          	}
    • Response: The response will serve as an acknowledgment that the request has been received, and it will be asynchronous due to the time-consuming nature of the process.
      • Success:
        {
            		"status": "received",
            		"errorMessage": null,
            		"additionalInfo": null
        	}
        
      • Error:
        {
            		"status": "error",
            		"errorMessage": <Error Message>,
            		"additionalInfo": null
        	}
        

      Once the execution is successful, utilize the workspace edit functionality to update the workspace by selecting the externally created table. This update is expected to proceed without issues.

To edit a workspace, follow these steps:
  1. Navigate to Workspace Management to display the Workspace Summarypage. The page displays Workspace records in a table.
  2. Click Action next to corresponding workspace and select Edit to edit the workspace.

    Figure 7-12 Edit Workspace window


    This image displays the Edit Workspace window.

    Note:

    You can modify the Workspace Type from Sandbox to Production or vice versa.
    For more details on the Basic Details fields, see Configure Basic Details section.

    Note:

    While updating a workspace, if any of the DMM operations such as Procedures, Functions, Packages, and so on fails, DMM operations alone will be rolled back and workspace will not be rolled back. You can verify the details in MMG_SANDBOX_DETAILS, MMG_SANDBOX_MASTER, MMG_SANDBOX_SCHEMA tables.
  3. Click Save.

    Note:

    The Details option has been added, replacing Edit Workspace in Action list of workspace. In the Details screen, the Edit Workspace is available.

    The background concept has been added while adding/editing workspace. Once a user clicks on update option, the confirmation message will pop up and the user will be redirected to Sandbox Summary screen where the workspace will display as loading, indicating add/edit process is going on. Meanwhile, the user can proceed with other tasks and operations, instead of waiting for the workspace to be created or edited.

    Note:

    The users should not perform manual modifications on the Target and Source Schema objects.

    Currently, there are scenarios where in manual changes are performed directly on the Target Schema and this leads to failure when user performs Workspace Edit operation. Therefore, the user should ensure not to perform any manual modification to underlying database objects in Source and Target Schema.