Skip to main content

Uploads csv data to Rhumbix

Project description

# DataLoader

The Rhumbix DataLoader provides a basic utility to import data into your Rhumbix account. It reads in csv files from the `csv_directory` provided in the invocation, and updates or inserts the data to the Rhumbix company identified.

There are three types of Rhumbix data that can be imported, Projects, Cost Codes, and Worker information. Each data has different required fields and identifiers that roughly follow the csv templates provided by Rhumbix.

This utility requires a Rhumbix account and access to the API. The Rhumbix company is authenticated through the public API the `company_key` and `api_key`. More documentation on the Public API can be found at

## Setup
pip install rhumbix_csv_processor

## Usage
### Process CSV directory

The script can be invoked as follows:

`rhumbix_csv_uploader csv_directory company_key api_key`

This will process files matching `rhumbix_employee*.csv` as employee files, `rhumbix_project*.csv` as project files, and `rhumbix_cost_code*.csv` as the cost code files.

Optionally, you may provide a `config.json` in your current directory with any of the following parameters:
"company_key" : "YOUR_COMPANY_KEY",
"api_key" : "YOUR_API_KEY",
"employee_filename_pattern" : "YOUR_EMPLOYEE_FILENAME_REGEX",
"project_filename_pattern" : "YOUR_PROJECT_FILENAME_REGEX",
"cost_code_filename_pattern" : "YOUR_COSTCODE_FILENAME_REGEX"

### Employee CSV
#### File Format
The employee processor expects a csv file with no headers and columns formatted in the following order:

`company_supplied_id, first_name, last_name, classification-role, trade, is_active`

### Project CSV
#### File Format
The project processor expects a csv file with no headers. the `Customer Number` is currently not used in Rhumbix. The columns are formatted in the following order:

`job_number, Customer Number - unused, name, is_active`

### Cost Code CSV
#### File Format
The cost code processor expects a csv file with no headers. The `phase` is concatenated with the `cost_code` inside the Rhumbix system. The columns are formatted in the following order:

`job_number, name, cost_code, phase, description`

### Direct Usage
If desired, the individual loaders can be called directly with the following format.

from rhumbix_csv_uploader import employee_processor
employee_processor.process_csv("rhumbix_csv_uploader/test/exampleCSVs/rhumbix_payroll.csv", COMPANY_KEY, API_KEY)

from rhumbix_csv_uploader import project_processor
project_processor.process_csv("rhumbix_csv_uploader/test/exampleCSVs/rhumbix_wo.csv", COMPANY_KEY, API_KEY)

from rhumbix_csv_uploader import cost_code_processor
cost_code_processor.process_csv("rhumbix_csv_uploader/test/exampleCSVs/rhumbix_job_cost_2.csv", COMPANY_KEY, API_KEY)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rhumbix_csv_uploader-0.0.4.tar.gz (10.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page