# Datasources

Datasources are the heart of GravaMetrics. A datasource is a collection of data that has been imported into the system. Each datasource as a few different attributes that you control when creating it:

  • Name - To allow yourself and other users that you have shared the data with to identify what this data is, an example here would be "Sales Data"
  • Type - This identifies the method the user used to import the data be that an Excel file or import from at database such as MySQL
  • Owner - The user that imported the data into the system

Each datasource is subdivided into several "Sheets" much like Excel. Depending on the type of the datasource this may be related to the type of data imported. For example when uploading an Excel File the sheets are directly mapped to sheets within the datasource. A CSV will only have a single Sheet "Sheet 1" automatically created when it is uploaded. A database will have each table selected for import as a separate Sheet within the system.

All charts within a dashboard can only take data from a single sheet within a datasource. So if you wish to have data from two CSV files combined, for example, you must give them the same datasource name and select the merge option. More details on this in the Create section below.

Data within a Sheet is organised into "Columns" much like an Excel file. Each of these "Columns" has a name and a type. The name can be changed within the Upload Viewer and there are three distinct "types' within the system:

  • Number
  • Text
  • Date

The type determines two things:

  • Which aggregation operations can be performed e.g. numbers can be averaged but text cannot
  • Grouping operations e.g. grouping by date allows grouping by month and quarter but grouping by text only shows the text values

If this sounds too complicated don't worry you generally don't need to know about this and it's only here for reference. The first thing you will want to do with datasources is create a new datasource.

# Create

To create a Datasource you can Click the:

  • "No Datasources. Click Here to Create a Datasource" link if you currently have no datasources
  • The Plus icon on the home page under the Datasources section
  • Datasources -> Create menu item
  • The Plus icon next to the search on the Datasources List page

Regardless of how you get there once you click any of these you will be shown a list of different types of data that can be uploaded into the system:

Datasource Create

You can use the search box to filter down to specific type for example Excel or OneDrive.

Clicking on a type will start the import process for that type. The different types have slightly different processes to importing the data these are described below.

# Csv

The CSV datatype allows the user to import files containing comma separated values. The file should contains a set of "rows" of data each separated by a new line. After selecting the Csv file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your Csv file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Dropbox

The Dropbox datatype allows the user to import files from the users DropBox account. The filetypes that can be imported from dropbox are:

  • Excel
  • CSV
  • JSON
  • XML
  • SAS
  • SPSS

After selecting dropbox as a datatype the dropbox chooser will appear and after authentication with dropbox will allow the user to select files from their dropbox account:

Dropbox

Select the file and the click the choose button to import that file. After the import process has completed the system will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Excel

The Excel datatype allows the user to import Excel files. After selecting the Excel file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your Excel file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Google Analytics

The Google Analytics datatype allows the user to import data from Google Analytics. After selecting the Google Analytics type on the Create page you will be prompted to login to the Google account that has access to the Google Analytics data that you wish to import. Once logged in into this account the user is displayed the Settings for import data from Google Analytics:

Google Analytics

Select an Account from the account drop-down. Then select a web property for this account. Lastly select a view from the View drop-down.

You must then select a date range for the data and what data you wish to import from the "Data to Import" table:

Google Analytics Data To Import

There are hundreds of different types of data to import from Google Analytics. Each of these types of data has several properties:

  • ID - The internal name that Google gives this type of data
  • Name - Friendly short name for the data
  • Group - Google groups data into "areas". Some of these are from internal systems some or groupings of logically similar data. This is the name of the group as given by Google
  • Type - Can be Metric or Dimension. A Metric is a numerical value like integer or percent a Dimension is a non-numerical value like text
  • Data Type - This indicated the exact data type that Google stored this data

You can also see a description of this data if you click on the left arrow in the table:

Google Analytics Data To Import 2

After selecting all of the data you wish to import into gravametrics from this table select the Import button and wait for the Upload Viewer to appear.

# Google Drive

The Google Drive datatype allows the user to import data from their Google Drive. The filetypes that can be imported from Google Drive are:

  • Excel
  • CSV
  • JSON
  • XML
  • SAS
  • SPSS

After selecting Google Drive as a datatype and after authentication with Google. The Google Drive picker will appear and allow the user to select files from their Google Drive:

Google Drive Picker

Select the file and the click the select button to import that file. After the import process has completed the system will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Json

The Json datatype allows the user to import files containing json data. The Json structure that GravaMetrics can parse is similar to that of a spreadsheet please see an example file here. After selecting the Json file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your Json file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# MailChimp

The MailChimp datatype allows the user to import data from their MailChimp account. The users mailchimps "lists" are imported from MailChimp. After selecting MailChimp as the datatype the settings page allows the user to import thier data:

Mail Chimp Settings

To import data Enter the api key key and click connect. Then select which list you wish to import from the lists drop-down and click import. Each list is imported as a "Sheet" into GravaMetrics.

# MariaDb

The MariaDb datatype allows the user to import data from MariaDb databases. After selecting MariaDb as the datatype the Database Connection page allows the user to import their data:

MariaDb

To import data first a connection must be made to the database. You must allow connection from the GravaMetics webservers IP address:

  • 51.15.134.36

You configure the connection string as follows:

mariadb://username:[email protected]:port/database

The username, password, host and database should be URL encoded (opens new window). Enter an appropriate connection string into the Connection String textbox and click the connect button. If the connection is successful the the Tables drop-down will appear and then you can select the tables you wish to import. The import process is started by clicking the import button. Once the import is complete the Upload Viewer will appear.

Large Number Of Tables

If the tables are very large it may take some time to import the data into the system.

# MongoDb

The MongoDb datatype allows the user to import data from MongoDb databases. After selecting MongoDb as the datatype the Database Connection page allows the user to import their data:

MongoDb

To import data first a connection must be made to the database. You must allow connection from the GravaMetics webservers IP address:

  • 51.15.134.36

You configure the connection string as follows:

mongodb://username:[email protected]:port/database

The username, password, host and database should be URL encoded (opens new window). Enter an appropriate connection string into the Connection String textbox and click the connect button. If the connection is successful the the Collections drop-down will appear and then you can select the collections you wish to import. The import process is started by clicking the import button. Once the import is complete the Upload Viewer will appear.

Large Number Of Collections

If the collections are very large it may take some time to import the data into the system.

# MSSQL

The MSSQL datatype allows the user to import data from MSSQL databases. After selecting MSSQL as the datatype the Database Connection page allows the user to import their data:

MSSQL

To import data first a connection must be made to the database. You must allow connection from the GravaMetics webservers IP address:

  • 51.15.134.36

You configure the connection string as follows:

mssql://username:[email protected]:port/database

The username, password, host and database should be URL encoded (opens new window). Enter an appropriate connection string into the Connection String textbox and click the connect button. If the connection is successful the the Tables drop-down will appear and then you can select the tables you wish to import. The import process is started by clicking the import button. Once the import is complete the Upload Viewer will appear.

Large Number Of Tables

If the tables are very large it may take some time to import the data into the system.

# MySql

The MySql datatype allows the user to import data from MySql databases. After selecting MySql as the datatype the Database Connection page allows the user to import their data:

MySql

To import data first a connection must be made to the database. You must allow connection from the GravaMetics webservers IP address:

  • 51.15.134.36

You configure the connection string as follows:

mssql://username:[email protected]:port/database

The username, password, host and database should be URL encoded (opens new window). Enter an appropriate connection string into the Connection String textbox and click the connect button. If the connection is successful the the Tables drop-down will appear and then you can select the tables you wish to import. The import process is started by clicking the import button. Once the import is complete the Upload Viewer will appear.

Large Number Of Tables

If the tables are very large it may take some time to import the data into the system.

# OneDrive

The OneDrive datatype allows the user to import data from their Microsoft OneDrive. The filetypes that can be imported from OneDrive are:

  • Excel
  • CSV
  • JSON
  • XML
  • SAS
  • SPSS

After selecting OneDrive as a datatype and after authentication with Microsoft. The OneDrive picker will appear and allow the user to select files from their OneDrive:

OneDrive

Select the file and the click the Open button to import that file. After the import process has completed the system will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# PostgreSQL

The PostgreSQL datatype allows the user to import data from PostgreSQL databases. After selecting PostgreSQL as the datatype the Database Connection page allows the user to import their data:

PostgreSQL

To import data first a connection must be made to the database. You must allow connection from the GravaMetics webservers IP address:

  • 51.15.134.36

You configure the connection string as follows:

mssql://username:[email protected]:port/database

The username, password, host and database should be URL encoded (opens new window). Enter an appropriate connection string into the Connection String textbox and click the connect button. If the connection is successful the the Tables drop-down will appear and then you can select the tables you wish to import. The import process is started by clicking the import button. Once the import is complete the Upload Viewer will appear.

Large Number Of Tables

If the tables are very large it may take some time to import the data into the system.

# SAS

The SAS datatype allows the user to import SAS files (.sas7bdat). After selecting the SAS file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your SAS file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# SPSS

The SPSS datatype allows the user to import SPSS files (.sav). After selecting the SPSS file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your SPSS file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Xml

The XML datatype allows the user to import files containing XML data. The XML structure that GravaMetrics can parse is similar to that of a spreadsheet please see an example file here. After selecting the XML file type on the Create page the user will be prompted for the file:

File Upload

To upload your files you can either click on the box and be prompted for the file or you can drag and drop the file onto the displayed box.

The system will then process your XML file. After the file is uploaded into the system it will display the Upload Viewer.

Large Files

If your file is large then please wait a few minutes for it to upload into the system.

# Upload Viewer

The Upload Viewer allows the user to view / edit data that is about to be or has been uploaded into the system. It is always shown at the end of the import process:

Upload Viewer

The upload viewer functions similar to excel in that there is a table of rows and columns that show the data. Each columns name is indicated at the top of the column:

Columns

Right clicking on the column brings up a drop-down menu with various actions:

Columns Menu

Clicking on these menu actions will allow the user to rename / delete / insert a column into the sheet. Clicking cancel will close the drop-down menu. A similar menu will appear on right clicking on the rows:

Rows Menu

This menu is similar to the columns menu but allows operations on the rows of the current sheet. It also includes the option to delete all rows, this option deletes all rows that are currently being viewed. So if you have a search setup then only the data within you search will be deleted:

Search

The search bar is used by typing a search term and then pressing the enter key. The search will filter the data to be all rows that contain anything that contains the search term. So, for example, if you want to search for a number type the number and hit enter and any rows that contain that number will be shown.

The sheets in the current datasource are show as tabs above the main viewer:

Sheets

Left clicking these sheets changes the sheet being viewed. By default the first sheet is always shown.

There is a pagination system for each sheet which allows rows per page and each page to be changed:

Pagination

When uploading data into the system there are certain settings for the import. These are accessed by clicking on the gear icon at the top of the upload viewer:

Settings

Settings Dialog

Changing these settings and clicking on the Save button will cause the data to be re-imported back into the system. To cancel this dialog clicking the X button at the top right.

When creating a datasource the user must give it a name this is done once the user is happy with the data that is going to be uploaded into the system by clicking the upload button. This will prompt the user to enter the datasource name:

Datasource Name

Enter the name and click the done button to confirm the datasource name. If there is already a datasource in the system with the same name then the user will be asked if they wish to Merge or Overwrite the current datasource.

Merge Or Overwrite

Merging will merge all the data that is being uploaded into the existing datasource such that both the existing sheets, rows, columns and the new will appear when the datasource is viewed and and queries will be on this new merged datasource. Overwrite will cause the existing data to be completely removed before the data in the upload viewer is imported into the system under the entered datasource name.

Overwriting Datasource

Overwriting a datasource will completely remove all exisiting data permanently. If the data is completely different then this will break existing dashboards that rely on that data.

# List

The Datasource List is access either through the top left menu in the system or by clicking on the Datasources text on the home page:

Datasources List

This page show all datasource that you have access to, these can be datasources that you have created or datasources that have been shared with you. The list of datasource can be filtered by using the search box at the top of the screen. New datasources can be added by clicking the plus icon at the top right of the screen.\

The datasources table has five columns:

  • Name - the name of datasource
  • Owner - the user that uploaded the datasource into the system
  • Sheets - the number of sheets that the datasource contains
  • Created On - the date that the datasource was created / edited last
  • Actions - list of actions that can be performed by your current user on the datasource

# Actions

The action in the actions menu of the datasource list table are described below:

View takes the user into a readonly view of the datasource which will allow the user to sort, filter and page through the data but not change the data in any way:

View Datasource

Copy allows the user to create a copy of the data. Once clicked the user is prompted to confirm they wish to copy the datasource:

Copy Datasource

This will then create a copy which will have the same name as the datasource but with (Copy) at the end fo ti's name. It can then be renamed by clicking edit, changing the name and clicking save.

Edit will take the user into the edit mode of the Upload Viewer. This allows the user to delete columns and rows similar to when uploaded and it also allows the user to change the name of the datasource. Similar to when uploading if the name is changed to an existing name then the Merge / Overwrite dialog will appear.

Export will export the data into and Excel spreadsheet and download this locally onto the users downloads folder.

The Delete action will prompt the user if they wish to delete this datasource and then delete the datasource if the user confirms.

Deletion

Please note that deletion of a datasource is permanent in other words once deleted the datasource cannot be recovered by GravaMetrics.