Depth Adjustment Tool (DAT) - Reverse Save Order Feature
Background
Micromine Geobank’s DAT is particularly suited to coal exploration and mining customers. The DAT allows the correction of drilling depths to geophysical depths, which have a closer accuracy to true depth. Most Micromine Geobank coal clients have been set up with a similar DAT and may experience the below scenario. If there is bespoke configurations to the DAT, please contact a Geobank specialist to inquire.
The Problem
When geologists are conducting geophysical corrections using the DAT, in some but not all cases, there will be an interval of downhole data (more commonly lithology data) that requires depth correction to an equivalent interval of the same thickness. Essentially requesting to update the current record with the same depths of an existing record. Consequently, this breaks the primary key constraint (unique identification of each record ) of the table. In other words, the background SQL of the DAT is attempting to update the current record with the same data entries of an existing record.
For example, the below screenshot displays the scenario above.
Figure 1: Test depth adjustment - Coal (C6 Lithology Adjective) Interval156.90m – 157.00m corrected to Coal (C5 Lithology Adjective) Interval 157.10m – 157.20m
In Figure 1’s example, there are two intervals of data - Coal (C6)156.90m – 157.00m (10cm interval) and Coal (C5) 157.10m – 157.20m (10cm interval). The fixed tie line correction is attempting to move down exactly 20cm, effectively updating C6’s depths (156.90m – 157.00m ) to C5’s current depths (157.10m – 157.20m). When we apply the tie-lines and save, we get the following error message log in Figure 2.
Figure 2: Depth Adjustment Tool – Violation of Primary Key error message
The dataset “CustomUpdateSQL” as the name suggests can be customized to each individual client’s DAT configuration. Nonetheless, any error message indicating a “Violation of PRIMARY KEY constraint…” or referencing "Cannot insert duplicate key in object *table name*” is indicating a primary key error.
The Solution
The reverse save order feature in Geobank’s DAT allows users to change the direction (top-down or bottom-up) of background SQL update statements to the applied downhole tables. Following the example above, the core correction is moving the raw lithology depths down to align with geophysical signatures. The current save order is top-down as indicated by the down arrow in Figure 3.
Figure 3: DAT: Top-Down Save Order
By clicking on the Reverse Save Order icon, the update statements are reversed and run bottom-up as indicated in Figure 4 (below). The core correction depths are now able to be updated in the table, and changes are saved successfully without violation of the primary key in the table.
Figure 4: DAT: Down-Up Save Order
Want to learn more?
Online Help Manuals - Click here for the latest version
Learning Management System - Click here to login or here to request access
Comments
0 comments
Please sign in to leave a comment.