Export templates provide complete control over what data gets exported from MX Deposit, and how it appears in the export files. You can select the header/fields/tables/columns that you want to include in an export, you can set export labels for files and column header, and you can set filters and rankings to control what data is exported.
How it Works
You must first configure your export template and configure all the various export options. Once the template configuration is complete, it then becomes an option in the export icon on the main drill hole/point landing screen. You can set an export template to be private or shared, depending on whether only you should see the option or if all users can see the option.
Exporting using an export template works much the same as the default Export function, except that you can customize the output.
Every user that has access to the export module can create export templates. Export templates that are "private" are only visible to the original creator of the template. Export templates that are "shared" are visible to all users that have access to the project. Only the original creator of the export template can edit it, with the exception of users that have the "admin" role (who can edit any template).
Create an Export Template
To create an export template:
1. Click on the "Export" module in the main left navigation.
2. Click on the "Export Templates" tab.
3. Click on the "New template" button, and select the project that you want to create the template for.
General Settings
1. The General settings page will appear as the starting point to set up your export template.
Template type
Select if this template is for data contained in Drill Hole activities, or data contained in Point activities
Destination
Select the output format for the export template. You can choose both file options, or just one.
Template name
Enter a unique name for this export template. This name will be used to identify the export template when the user wants to run an export.
File Encoding
If you require the export files to be encoded in something other than UTF-8, you can change this option. Be default, all export files will be encoded using the UTF-8 character encoding. For more information about this encoding option, refer to the Export Data article.
Template Code
You can use this "code" when making export requests through the MX Deposit API. The code value defined here can be referenced as a parameter when making an export request through the API.
Grid
Select the coordinate system that you want to use to populate the "converted.coordinate" columns in the header file. For more information about this grid option, please refer to the Export Data article.
Date Format
Select the date format that you want to apply to all date values in the export files. The default date format is determined by your browser regional settings. For more information about this grid option, please refer to the Export Data article.
Create Export Template from
You can use this option to clone an existing export template as a starting point for this new export template. All options and preferences will be copied over to this new export template, and you can make changes without impacting the original export template.
Additional options
Include files |
This option will export any files associated with the holes/points that are being exported. Files are organized by hole/point, and then organized by file type (photos vs. other files). |
Include metadata |
This option will export a metadata file for each table in the export. The metadata file is in JSON format, and describes the schema of the data in each export file (e.g. data types, validations, list values). |
Make shared template |
By default, export templates are "private" - which means that only you (the original creator) of the template will be able to use it. If you want other users to be able to use this export template, you must enable this option to make the template a "shared" template. |
2. Once you have filled out the general settings, click "Next".
Select Tables
1. A list of available activities will appear in the "Select tables" step. These are the activities that you can choose from to include in the export template. You can restrict your export template to a single activity, or you can include multiple activities.
2. For each activity, select the header and tables that you want to include in the export template by clicking on each option, or by using the "Select all" option.
3. When a table is selected, it shows in a blue "selected" state. Only selected tables will be exported.
4. When a table is selected, a default filename is applied. This is the name that will be given to the exported CSV file. The default filename is a combination of the activity and the table name, with all spaces replaced with an underscore "_" character.
5. To change the export CSV filename, click on the pencil/edit icon, edit the name, then use the <Enter> key or click out to save the change.
6. You can also create duplicate copies of each table, in the event that you want to export the same table twice but with different preferences (e.g. sample table for "original" only, sample table for "original" and "dup"). To duplicate a table, click on the duplicate icon.
7. If you click on the "Common Tables" option in the activity list, you will see all cases where the same table has been used across the various activities. For example, if you used the same Lithology table in the "Core Logging" activity and the "RC Logging" activity (even if it's used in a table view in either), it will appear as a common table. This means that you can export the data from that table, across multiple activities, in the same export file. In my example, we can combine the lithology data from the Core Logging activity with the lithology data from the RC Logging activity.
The Header also falls into the category of a "common table", where header fields across all activities can be combined into a single export file.
8. To enable a common table, click on the activity name that you want to combine into the single export file, or by using the "Select all" option to select all options.
9. To change the common table export CSV filename, click on the pencil/edit icon, edit the label, then use the <Enter> key or click out to save the change.
10. Once you have selected all of the headers/tables that you want to include in the export template, click the "Next" button.
Select columns
1. A list of available columns for the selected tables will appear in the "Select cables" step. These are all of the columns for the selected tables that you can choose from to include in the export template. You can restrict your export template to specific columns, or you can include all columns.
2. For each table, select the columns that you want to include in the export template by clicking on each option, or by using the "Select all" option.
3. When a column is selected, it shows in a blue "selected" state. Only selected columns will be exported.
4. When a column is selected, the default name is the actual name of the column. This is the name that will be used as the column header in the exported CSV file.
5. To change the export CSV column name, click on the pencil/edit icon, edit the name, then use the <Enter> key or click out to save the change.
6. For columns that use a "list" data type, you can incorporate additional columns from the list in the export file. By default, when you include a list column - the "Value" column from the list is selected and renamed to match the column name in the table ("Value" -> "Lithology").
For example, if you have a "Lithology" list that looks something like this:
And a Lithology table/column that uses this list, when you include that table/column in the export template - you can also choose to include any of the additional columns from this list in the export file.
7. To apply filters to a table, click on the Filters icon. A blank Filter panel will appear.
Click the "Add new" link to add a filter on a column, and choose the filter options.
Remember to click the "Apply" button to save the filter. The Filters icon will appear filled-in when a filter is applied.
Following the "duplicate table" example from the previous step, you can set a filter on the "Samples_ORIG" table to only include rows where [Sample Type] = "Original". You can then set a filter on the "Samples_ORIG_DUP" table to include rows where [Sample Type] = "Original" OR "Duplicate". Each table can have its own set of filters applied.
NOTE: You can apply filters to any column, not just the columns that have been selected for export.
8. For the header and survey table, you can specify a ranking to determine what values are exported. By default, the header will use the "top" row in the coordinates table (as described in the Export Data article), and the survey table will export all rows. If you want to use the ranking option, you must first enable it, and then set the desired order/ranking of the available options.
9. To set a ranking for the header coordinates, click on the "Coordinates Ranking" option in the Header table.
When the ranking option has been enabled, it shows in a blue "selected" state and the ranking options will appear.
The values that appear represent the [Type] column in the coordinates table.
Re-order the coordinate type options in the order that you want the export to use when exporting coordinates in the header file.
The export will work top-down this list for every hole/point included in the export. In the example image shown, if a hole/point has an "Actual" coordinate row, the export will use that value in the header file. Otherwise, if a hole/point has a "Planned" coordinate row, the export will use that value in the header file.
10. To set a ranking for the survey table, click on the "Survey Ranking" option in the Survey table.
When the ranking option has been enabled, it shows in a blue "selected" state and the ranking options will appear.
The values that appear represent the [Type] column in the survey table.
Re-order the survey type options in the order that you want the export to use when exporting survey rows in the survey file.
The export will work top-down this list for every hole/point included in the export. In the example image shown, if a hole/point has rows in the survey table with "Gyro" as the [Type] value, the export will only export those rows. Otherwise, if a hole/point has "Maxibor" rows, the export will only include those rows, and so on. This ranking option will only export the rows that match the ranking options. Another common scenario for survey data is where users have added a [Ignore] or [Bad reading] column to the survey table, and then add a filter to the survey export template to not include those rows.
11. Once you have selected all of the columns that you want to include in the export template, and configured all relevant export options, click the "Next" button.
Summary
1. A list of all the selected headers/tables/columns will appear, as they will appear in the export files (i.e. the export labels).
2. To re-order columns within a table, click on the left-side handle and drag the columns up/down to the desired position.
3. If you want to make any changes to the export template, you can click back through the steps along the bottom. Otherwise, if you are happy with your export template settings, click the "Save" button.
To edit an export template:
NOTE: Only the original creator of the export template can make changes. One exception to this is users with the "admin" role, who can edit any export template.
1. Click on the "Export" module in the main left navigation.
2. Click on the "Export Templates" tab.
3. Click on the export template that you want to edit. It will open on the "Summary" step, but you can click to any step along the bottom.
4. Once you have completed making your changes, click the "Save" button.
To delete an export template:
NOTE: Only the original creator of the export template can make changes. One exception to this is users with the "admin" role, who can edit any export template.
1. Click on the "Export" module in the main left navigation.
2. Click on the "Export Templates" tab.
3. Click on the "..." menu option for the export template that you want to delete, and choose the "Delete" option.
4. In the "Delete export template" dialog, type in the word "DELETE" and click on the Delete button to complete the action.
1 Comments