Exporting data to Oracle
The Open Data Export Centre allows data to be exported from InfoWorks WS Pro to a variety of formats including Oracle database.
The minimum version of Oracle supported for export without spatial data is Oracle 8i. To export spatial data a minimum version of Oracle 9.2 is required.
In addition to exporting data to a new Feature Class, the Open Data Export Centre can be used to update an existing Feature Class.
Exporting to a New Feature Class
The Open Data Export Centre can be used to export InfoWorks WS Pro tables to a new Feature Class in an Oracle database. Further details of export options are listed in the Open Data Export Centre topic.
To export to a new Feature Class:
- In the Open Data Export Centre dialog select the InfoWorks WS Pro table to be exported from the Table To Export Data From dropdown.
- Select the Oracle option from the Export Type dropdown in the Export Data To section.
- Use the File browse button to connect to an existing database. The Select Oracle Data dialog will be displayed. Show image
- In the Select Oracle Data dialog, connect to an existing database, select the user tables to view and click OK.
- In the Open Data Export Centre, type in the name of a new Feature Class to which the data is to be exported.
- Map InfoWorks WS Pro internal fields to Feature Class export fields by loading a configuration file or by manually mapping the fields in the Field Mapping Grid.
- Click the Export button.
The specified Feature Class will be created and InfoWorks WS Pro data will be exported to it.
Updating an Existing Feature Class
In addition to exporting data to a new Feature Class, the Open Data Export Centre can be used to update an existing Feature Class.
In order to update an existing Feature Class, the user must either own the table, or have been granted the appropriate permissions in Oracle to update the table. Tables for which the user does not have the appropriate permission will not be available for selection in the Open Data Export Centre.
To update an existing Feature Class:
- In the Open Data Export Centre dialog, use the File browse button to connect to an existing database. The Select Oracle Data dialog will be displayed. Show image
- In the Select Oracle Data dialog, connect to an existing database, select the user tables to view and click OK.
- In the Open Data Export Centre, select an existing Oracle Database Feature Class from the Feature Class dropdown list. The Updating and Delete Options section will become enabled.
- Map InfoWorks WS Pro internal fields to Feature Class export fields by loading a configuration file or by manually mapping the fields in the Field Mapping Grid. In the Field Mapping Grid:
- Red indicates items in the Export Field Name column and Internal Field column that are mapped as update keys
- Italic font in the Export Field Name column indicates fields that do not exist in the selected Feature Class.
- The Export Field Name column contains a drop list of only the field names from the selected Feature Class. Entering a non-existent name specifies a new field name.
- Map update keys - select the fields to be used to locate items for update in the specified Feature Class. The Update Based On dropdown list contains all update mapping options applicable to the current Table to be Exported:
- Asset ID - the Asset ID field is used to locate row objects in the specified Feature Class.
- InfoWorks WS Pro Primary Key Fields e.g. Node ID for node objects; From Node ID, To Node ID, Suffix for link objects. The Primary Key Fields are used to locate row objects in the specified Feature Class.
- Set Only Update Existing Objects option:
- Check the Only Update Existing Objects box to restrict update to objects that already exist in the specified Feature Class. If this option is unchecked, any objects in the InfoWorks WS Pro table to be exported that do not match objects in the Feature Class will be added to the Feature Class.
- Set Delete Missing Objects option:
- Check the Delete Missing Objects box to search for missing objects and delete them from the target database at the end of the export process. (A missing object is an object that is in the external Data source table, but is NOT in the InfoWorks WS ProTable to Export Data From.)
- The update key selected in the Update Based On dropdown will be used to search for missing objects.
- All missing objects found will be listed and a prompt for confirmation of deletion will be displayed before any objects are deleted.
- Click the Export button to export data from InfoWorks WS Pro to the specified Feature Class. All fields, except mapped update keys will be updated in the Feature Class.
Notes
Errors and warnings may be displayed after export listing details of row objects that have not been updated. Examples of reasons for update failures are listed below.
- There are multiple matching rows in the target database. For example, when updating based on Asset ID, if more than one object has the same Asset ID.
- The data type is invalid. For example, if trying to use character data to update a field in the Feature Class with a data type of double.
- A row has a null update key. For example, when updating based on Asset ID, if the InfoWorks WS Pro Asset ID field is null.
- Oracle field with the NOT NULL constraint is not present in the Field Mapping Grid.
- An object to be added has a null value field and the corresponding Oracle field has the NOT NULL constraint. The new object will not be added.
After carrying out a deletion, a summary of the export process is displayed including a count of items deleted from the target database. Show image
The summary provides information on the following:
- Row Objects Read: the number of InfoWorks WS Pro objects read for the purpose of adding or updating, but not deleting
- Row Objects Added: the number of new objects created in the target database
- Row Objects Deleted: the number of existing objects deleted from the target database
- Row Objects Updated: the number of existing objects updated in the target database
- Total Fields Updated: the number of fields updated. The count includes fields that were updated with the existing value.
Exporting Spatial Data
When connected to an Oracle server with Oracle Spatial loaded, the geometry of InfoWorks WS Pro objects can be exported by including an export field of field type Geometry in the Field Mapping Grid of the Open Data Export Centre dialog.