Importing Configuration From Scratch (4.3)

This article applies to version 4.3 of P2 Server. For help on the latest version, see Importing Configuration from Scratch

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. Import the spreadsheet.

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

Related: Tips on Filling in the Import Spreadsheet

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

You may find further information on crucial aspects of the Data Dictionary in the "Server Primers" section of the Help Center.

ImportantTemplates will not appear in P2 Explorer unless they are marked as Primary. Marking a template as primary is now done through the use of time ranges, as these are now historised. In the example below, we have an Oil Producing Well that is Primary from Forever (null) to Forever (null). The Other Template is not primary for any time period, because the start and end times are blank for the Primary Time Periods.

primarytemplate

 

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.

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 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 spreadsheet. The downloaded spreadsheet will be exactly the same as the file you imported, except that the GUIDs 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

 

Comments are closed