Import CSV File to Database
Here is a quick 3-step process for querying CSV data in Holistics. CSV reporting in Holistics requires you to import data into a reporting SQL database.
You can import CSV to your Database in either 2 ways:
Using Data Manager:
1, Go to Data Manager by clicking Manage:
2, Click Upload CSV and follow the instructions to import your CSV:
Import with Holistics CLI:
This requires Holistics CLI, make sure you have set up it.
Authentication
Login and authenticate. You can get the token in Holistics (go to Settings, under API Key section)
$ holistics login <token>
Authenticating token...
Authentication successful. Info:
- ID: 1
- Email: [email protected]
To Import a CSV file
To import a CSV file into database, run the following:
holistics import csv -f <path_to_csv_file.csv> -d <datasource_id> -t <dest_table_name>
Where:
-f
: path to your CSV file on local computer, make sure the CSV file has header row-d
: id of destination data source-t
: destination table name, e.g:dw.custom_csv_table
Example:
holistics import csv -f erp_data.csv -d 5-redshift -t dw.erp_data