Updating the Configuration (4.4.5)

This article applies to P2 Server versions 4.4.5 - 4.5.0. For the latest version, see Updating the Configuration

There will be occasions where you will want to update the P2 Server database in bulk, rather than manually adding individual items in P2 Server Management.  You can do this by exporting the existing data to a specially formatted Excel® spreadsheet. The spreadsheet is formatted so that the Data Dictionary has the required information to update your information model directly in the database.

Updating the data in the P2 database is a simple 3-step process.

  1. Export the existing P2 Server data in Excel format.
  2. Update the spreadsheet.
  3. Import the spreadsheet.

Let’s look at this process, step by step.

Step 1. Export existing data

Because both the format and content of the import spreadsheet is crucial to a successful update, we’ve made it easy for you to download the data you need to update. All you need to do is download or export the spreadsheet from P2 Server Management.

Read more: Exporting Your Configuration

export-all-445 

  1. In P2 Server Management, click the Import/Export icon in the navigation bar.
  2. Select the Export option from the middle panel, and then choose the 'Select All' option.  
    Alternatively, you can select the specific objects you want to export (read about dependencies here).
  3. Click the Export Server Data button.

The Excel spreadsheet will download and you will be prompted to save it to your computer.

 

Step 2. Update the spreadsheet

The key to a successful import is to make sure that everything in the spreadsheet is filled in correctly. 

Related: Tips on Filling in the Import Spreadsheet

The important part in an update is to make sure you have the Global Id columns filled in. These correspond to the GUIDs in the database that determine the records that will be updated. 

Note: The GUID is exported from the database into the Global Id column. Do not change this, or the database will not recognise the row.

guids

On the header rows in the spreadsheet, there are help comments for every column. This should provide you with enough information on what should be entered in the column. Click the little red comment indicator on the header row to see the help. You can find further information on crucial aspects of the Data Dictionary in the “Server Primers” section of the Help Center.

 

Step 3. Import the spreadsheet

When importing, P2 Server first checks the file for errors and then asks for your permission to proceed. This is a fail-safe mechanism to ensure no errors propagate into the system.

Note: During import, P2 Server Management is locked and other users will not be able to make any changes until the import has finished and the session is released.

The first part of the import process is similar to the export process:

1. In P2 Server Management, click the Import/Export icon in the navigation bar.

2. Select the “Import” option from the middle panel.

3. Drag and drop your file into the box, or click the box to browse for your file and upload it.

import-file

The process continues as soon as P2 Server detects your file. First, the file is checked for errors and an overview of the upload is displayed. The overview tells you how many rows have been counted for each worksheet, and highlights any errors that may be encountered. The overview for an error-free spreadsheet looks a bit like this:

workbookoverview

You must explicitly allow the import to proceed. You may continue to import a file with errors, but the system will disregard the errors and only import the correctly filled in sheets.

There are 2 import options you can choose from:

  • Create Only. Objects will only be ADDED to the database if they do not already exist. No existing objects will be updated.
  • Create and Update. Existing objects will be UPDATED with data from the import file, and new objects will be ADDED if they do not exist.

4. For the scenario where you are updating existing records, select the “Create and Update” option, and then click Import. Or if you are only adding new records, select "Create Only".

createonly

5. When the import has finished, a success message appears in the top right corner.

importsuccess

6. Scroll to the bottom of the screen to see the Import Summary.

This will show you the number of rows imported or updated per worksheet.

importsummary

7. At this point, you can download the updated spreadsheet. This spreadsheet will be exactly the same as the file you imported, except that the Global Id for the new rows will be updated. It’s a good idea to download the file if you intend to re-use your spreadsheet to update the database. This file will retain any formulas you used to calculate fields.

BEST PRACTICE

You should download the file if you intend to re-use your spreadsheet to update the database. The downloaded file will be exactly the same as the file you imported, except that the GUIDs will be updated. It will retain any formulas you used to calculate fields.

 

Otherwise, you can just simply close the session (click “Close session”). 

 

 

What if I get errors?

Errors and warnings are commonly encountered during processing and import, usually associated with the spreadsheet being filled in incorrectly.

Related: Server Import Errors


Release History

 

Comments are closed