Uploading Data

For bulk upload of data into Trekker system.


1. Uploading GPS Device

Uploading GPS devices will directly insert records into Mariadb.

Upload tools for specific client can be accessed at url

https://[client id]/.updevice.mdb.trekker.my

for example https://mlng7.updevice.mdb.trekker.my

It accepts an excel or csv file format for input with 6 columns as below:

  • NO
  • DEVICE NO
  • DEVICE ID NO
  • IMEI NO
  • DEVICE PHONE NO
  • GROUP

Notes: The above must be strictly followed without any extra column or rows to avoid import error.


2. Uploading User and bind to device

Uploading users and binding to device is done using a specific command-line tool named upuser. Data will be uploaded to CouchDB for a specific client.

Usage

Before using this tool,. list of devices must exists. Refer to 1. Uploading GPS Device above

CSV files must be in format

  • NO
  • NAME
  • IC/PASSPORT
  • COMPANY
  • DEPARTMENT/SUB COMPANY
  • POSITION
  • PACKAGE
  • HEX COLOR CODE
  • DEVICE NUMBER
Usage:
     upuser {flags}
     upuser <command> {flags}

Commands: 
     help                          displays usage informationn
     version                       displays version number

Flags: 
     -u, --cdburi                  target uri (default: https://admin:g@ssbloc123@@mrcsb2.cdb.trekker.my)
     -t, --traccarurl
     -d, --database                target database name where data will be uploaded 
     -f, --file                    source file containing data to upload in csv format 
     -h, --help                    displays usage information of the application or a command (default: false)
     -v, --version                 displays version number (default: false)

Example usage:

upuser -u https://admin:***@@mlng7.cdb.trekker.my -t https://admin@trekker.my:***@mlng7.abc.trekker.my -d deviceusers -f MLNG7_16\ JULY.csv