DataShedImportLayouts QuickGuide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

DataShed Import Layouts

Quick Guide

September 2021
DATASHED IMPORT LAYOUTS QUICK GUIDE

Contents
CONTENTS .................................................................................................................................................. 2
1.0 OVERVIEW ........................................................................................................................................ 3
2.0 IMPORTING DATA ............................................................................................................................. 3
2.1. Specify file and destination table ............................................................................................. 3
2.2. Viewing Buffer .......................................................................................................................... 4
2.3. Appending Data ........................................................................................................................ 5
2.4. Merging Data ............................................................................................................................ 6

Version History
Version Date Person File Name
1.0 Sept 2021 R Adriano DataShedImportLayouts_QuickGuide

maxgeo Page 2 of 6
Version: 202109
DATASHED IMPORT LAYOUTS QUICK GUIDE

1.0 Overview
Using DataShed import layouts, or importing directly into a database on the fly, is relatively
straightforward and intuitive in DataShed4. A brief summary of the main features is outlined below.

This document describes what to check for when importing data via DataShed’s import layout.

2.0 Importing Data


As a minimum requirement, the user MUST have permission to a DataSet as the DataSet filter cascades
for every user operation.

DataShed’s Import Data functionality is found in DataShed  Add-ins  Tools  Import Data

2.1. Specify file and destination table


When loading files, DataShed4 requires:
• Exclusive read / write capability to the file to load successfully. Example below shows a file
where DataShed is unable to get an exclusive read / write capability.

maxgeo Page 3 of 6
Version: 202109
DATASHED IMPORT LAYOUTS QUICK GUIDE

• Correctly formatted file formats


o CSV: quotes around a record is considered invalid
o Excel: commas within a cell / record may not import correctly
o Access: commas within a cell / record may not import correctly

2.2. Viewing Buffer


It is good practice to view the data and confirm that the data loaded is what the user is intending to
load.
a. Unsuccessful buffer loading CSV Example
In the example below, the CSV have quotes around the records. View Buffer shows the importer has
parsed 0 records. The source CSV file prominently features quotes.

b. Unsuccessful buffer loading Excel Example


The example below shows substitution of commas to spaces. Though these records can be potentially
imported, it is good practice to avoid commas inside records all together.

maxgeo Page 4 of 6
Version: 202109
DATASHED IMPORT LAYOUTS QUICK GUIDE

c. Successful buffer loading CSV Example


In the example below, the CSV has been properly parsed by the importer. The source data has the
correct formatting.

2.3. Appending Data


After loading a file to buffer, one of the two new options is “Appending Data”. As the name suggests,
this option will only attempt to insert the records that is loaded in the buffer. Existing records will NOT
be affected in this option. As shown in the screenshot below, the importer automatically maps the
source column and the destination column where the names match.

After mapping all the available fields, select “Append”. In the example below, there were 353 records in
the buffer but only 149 records were inserted in the database (204 rejected). Click “View Errors” to
interrogate the reason for the records being rejected.

maxgeo Page 5 of 6
Version: 202109
DATASHED IMPORT LAYOUTS QUICK GUIDE

In this example, the rejected records have missing libraries in LIB Prospect.

In addition, it is good practice to Export the rejected records so libraries can be updated, or data can be
remediated, ready for import. Typical reasons for rejection:
• Missing library codes
• In active library codes
• Duplicate data based on primary keys
• Invalid Depth_From / Depth_To

2.4. Merging Data


Merging data requires good SQL or database schema knowledge because the primary key fields must be
defined. As the name suggests, merging data does NOT create new records. This routine updates
records based on the defined primary keys.

The defined primary key fields will be used as means to identify which records to modify. Improperly
defined primary key fields can cause havoc since it could update a record in the database where the
user is not intending to.

In the example below, the destination table is tblDHColl (Collar table). The primary key fields for this
table are DataSet and Hole_ID.

The example below shows 6 records loaded but only one record was updated. Click “View Errors” to
interrogate the data further for reasons for the 5 records that did not merge.

maxgeo Page 6 of 6
Version: 202109

You might also like