For the complete documentation index, see llms.txt. This page is also available as Markdown.

11. Tracr Loader

Tracr Loader is a command line tool to upload diamond data to Tracr using the same CSV files as the Integration Tool.

Install and configure Tracr Loader

1

Deploy the executable file

The executable file is available in the Integration toolkit (go to Tracr Management Portal > Integration > Integration Tool > Integration toolkit).

Once downloaded, move the file to the target folder.

For example, on Windows:

Windows example
C:\tools\tracr
2

Setup the environment variables

Add Tracr Loader to the PATH

On Windows, open a Command Prompt and type:

Add to PATH (Windows)
setx PATH "%PATH%;C:\tools\tracr\"

Declare the following variables

  • TRACR_TC_APPROVAL You must set this variable to yes. It means you accept and agree to the Terms and Conditions (https://www.tracr.com/legal/terms-and-conditions).

  • TRACR_SECRET Authentication Token. Please contact support@project-tracr.com for more details.

  • TRACR_URL The URL to the Data Integration Tool service. Please contact support@project-tracr.com for more details.

On Windows, open a Command Prompt and type:

Set required variables (Windows)
setx TRACR_TC_APPROVAL "yes"    
setx TRACR_SECRET "<TOKEN_PROVIDED_BY_TRACR>"
setx TRACR_URL "<URL_PROVIDED_BY_TRACR>"

Usage

On Windows, open a Command Prompt and type:

Basic usage
tracer-loader.exe --integration <integration_type> --csv <full_path_of_csv_file> --batch <internal_reference> --session_id <session_id_of_a_previous_session>

Command-line arguments

Required:

  • -i, --integration [rough,split,polished,transfer]

  • -c, --csv full path to the csv file

Optional:

  • -h, --help show this help message and exit

  • -v, --version show program's version number and exit

  • -b BATCH, --batch BATCH

  • -s SESSION_ID, --session_id SESSION_ID

Upload new data with Tracr Loader

1

Prepare the data

Like the Data Integration Tool, create a CSV file to declare all the metadata of the diamonds to register.

Create the CSV file in a folder per session. The folder needs to contain all the additional files to be submitted (images, scans, reports, videos, and so on). You can organise the additional files in subfolders, or place all files together in the main folder.

2

Call Tracr Loader

For example, on Windows, open a Command Prompt and type:

Where:

  • C:\data\tracr\box_341 is the folder which contains the CSV file and the additional files for rough diamonds.

  • rough_box_341.csv is the CSV file.

Logs and output

Once a job is completed, the logs will be available in the subfolder tracr_output.

For example:

Recover a failed session

If Tracr Loader is interrupted when uploading files to Tracr, you can call Tracr Loader in recovery mode.

1

Find the session ID of the failed attempt

Open the logs of the jobs in the tracr_output subfolder and identify the line with the session ID.

For example:

2

Pass the session ID

Tracr Loader accepts an additional parameter --session_id to recover a previous run.

Once Tracr Loader starts in recovery mode, it will identify the files to upload and complete the process. When all files are uploaded, Tracr Loader submits the session automatically.

Last updated