Importing Configuration From Scratch

This article applies to versions 4.5.1 and later of P2 Server. For previous versions, see Release History.

When you first install P2 Server, you will most likely need to import data into a blank database. The best way to do this is to use P2 Server Management to import a specially formatted Excel® spreadsheet. The spreadsheet has been formatted so that the Data Dictionary has the required information to accurately model your data for use in other applications such as P2 Explorer.

Importing data into a blank database is a 3-step process.

  1. Export a blank spreadsheet.
  2. Fill in the spreadsheet.
  3. Create the zip file.
  4. Import the file.

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


Step 1. Export a blank spreadsheet

Because the format of the import spreadsheet is crucial to a successful import, we've made it easier for you by providing a blank template for you to fill in. All you need to do is download or export this from P2 Server Management.

  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). This is normally done when updating an existing configuration.
  3. Click the Export Template button.

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

 


Step 2. Fill in the spreadsheet

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

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.

importcomments

Read more: Tips on Filling in the Import Spreadsheet

 


Step 3. Create the zip file

This step only applies if you want to import images. To create the zip file for importing images:

1. Create a folder named 'images'.

2. Inside the images folder, create a folder for each image group. The name of the image group folder must match the name of the image group.

3. Place the images inside the relevant image group folder.

4. Zip together the images folder and the .xslx file. At the top level, your zip folder should look like this:

 


Step 4. Import the file

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. Use the .zip file from the previous step if you are including images, otherwise use the .xslx 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 file looks something 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 sheets with 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 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 importing from scratch, select the Create Only option, and then click Import.

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 per worksheet.

importsummary

7. At this point, you can download the updated file. The downloaded file will be exactly the same as the file you imported, except that the GUIDs will be updated in the spreadsheet. 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. You should work through these errors one by one to fix them.

Related: Server Import Errors

 


Release History

 

Comments are closed