How To: Add a new channel to an existing From-To database
Symptom/Problem:
Drillhole project has collars, survey and from-to databases created. Unable to use DH-Data > Refresh Project without re-importing data from the ODBC sources, and over-writing changes made to the current drillhole project. How to import an extra data channel, without over-writing the current existing channels in the project?
How do you add a new channel to an existing from-to database when connecting through ODBC to the source data tables, or using csv/ascii (text) import?
Environment:
This resolution applies to any version of Oasis Montaj with the Drillhole extension, or Target stand-alone.
Resolution:
Four methods, in decreasing order of appropriateness:
Method 1: Using ODBC database
1) DH-Data > Import > ODBC Database.
2) Select Import mode: Append/Merge.
3) Click on wizard, then New.
4) In this case you could select Microsoft Text driver (*.txt, *.csv).
5) Choose a suitable name for the data source driver (e.g. test), and choose the place to save this to.
6) Click Next, Finish. In the ODBC Text Setup, choose to use the current directory or another one (wherever your data files are stored). Click OK.
7) Select test.dsn - double-click to choose, or click OK.
8) Choose the FROM_TO.csv file, (which contains your extra channel of data).
9) Click Next, and choose what you want to import, in this example a channel "W". You must import the channels HoleID, Depth From, Depth To. All the rest can be set as "Not imported".
10) Click Next, and carefully name the Data name to match your existing "from-to" database to which you want to append channel "W". Since user selects append/merge in step (2), this will work.
I.e. chose the data name that matches the from-to .gdb, which contains the relevant assay (data) to which user wants to add channel "W".
11) Click Finish, and a log file reports the changes, e.g.:
"Merging/overwriting assay data for holes [~] etc."
Method 2: Not using ODBC database
The second method is slightly different to the above, and shortens the steps. If user selects DH-Data > Import > Text File, and selects the logical options for the import wizard, this will achieve the same result. It just takes the ODBC connection step out of this method.
User will notice in each case, we create a template, which is saved by default (in the project folder) to:
a) ~.i4 - for the ODBC template
b) ~.i3 - for the ASCII template
(where ~ is the name of the data file being imported)
User is able to rename these and use them again as a template if wanted to repeat similar imports.
Methods 3 and 4, may be applicable, for instance if user wanted to import data to merge with just one or two holes...or just a few fiducials (rows) of data
Method 3: Copy and paste
1) Use DH-Data > Import > Text File again, and import the new data to a fresh database.
2) Now simply create a channel "W" in the original from-to (e.g. assay) database.
3) From the new database, double click on channel "W" to select all the data, then right click and choose copy. On the empty channel "W" in the original database, right-click and select paste.
Method 4: Use Cross-database lookup
1) Import the csv file as above using DH-Data > Import > Text File.
2) Ensure the original *.gdb (from-to database) is selected in the Project Explorer.
3) Select Database Tools > Database Utilities > Cross database channel lookup (in 7.0), or X-Utility > Table lookups > Cross database channel lookup (6.4.2).
4) Select the name of your new database imported with the extra data as the lookup.
5) Select a suitable reference channel (e.g. DH_from), the data channel ("W"), lookup method will be "Exact", click OK.
