QuickStart Guide
Here is a quick walkthrough on how to create a workspace, data source, alias, user, run a query and kill a query. Let’s consider the example of two hospitals in town with their data sources named ‘HospitalDB_1’ and ‘HospitalDB_2’. Assume that the goal is to find the COVID positive patients in town. In the traditional ETL method, drawing insight from multiple databases was a tedious task. However, ShardOne allows effortless extraction of insights from multiple data sources.
Create a Workspace
- Click on the 'Create New' button on the dashboard.
- Enter the Workspace Name as "COVID Patient Records" and Description as "Workspace for managing COVID patient data."
- Save the new Workspace.
- For more details about Workspace Management, click here.
Create a Data Source
- Click on the 'Create New' button on the data sources page.
- For example, let's enter the Data Source Name as "HospitalDB_1" and the Description as "Database for COVID patient records."
- Here, the datasource, such as "MySQL" can be chosen for this example.
- Similarly, a second Data Source can be created with the name “HospitalDB_2” and the Description as “Database for patients in Hospital 2". “Oracle” can be chosen as the datasource.
- Fill in the configuration details, such as the database host, port, credentials, and database name.
- Click on 'Test Connection and Save' to verify the connection and save the data source.
- For more details on Datasource Management, click here.
Create & Map an alias
- Navigate inside a datasource where all the items are listed. For instance, select HospitalDB_1. Assume that the item in it is ‘Users’ indicating the table of records of patients in Hospital 1.
- In the Alias column, select the alias from the dropdown list against the corresponding item. Here, it would be ‘Users’.
- If the typed alias does not exist, an option to create a new one will appear. Click on the New Alias option to create it. In this case, let's create an alias named "Patients" to represent the patients.
- Similarly map the alias ‘Patients’ to the corresponding patient item in HospitalDB_2, let’s assume it to be ‘LA.persons’.
- Subsequently, if the fields inside the items are different in both the datasource, field aliases could be mapped to them so that they could be referred to using a single name.
- An added alias can be removed by clicking on the ‘x’ button next to it.
- To know more about Aliases, click here.
Run a query
Navigate to the Composer in the Query tab.
To reference just a single table, let’s say patient records of HospitalDB_1, use can use the syntax
SELECT <attributes> FROM <Datasource Name>.<Item Name>
Hence our query would be
SELECT * FROM HospitalDB_1.Users
This approach would retrieve results exclusively from Hospital 1. To obtain results from Hospital 2, a distinct query would be necessary. However, using an Alias enables condensing the process into a single query.
The syntax of the query using an Alias would be
SELECT <attributes> FROM <Item Alias>
As both patient entities in both the hospitals are mapped to the alias ‘Patients’, our query would be
SELECT * FROM Patients
This action would retrieve all the records from both datasources simultaneously.
Click on the ‘Run’ button to perform the query. The query results will be displayed in the tab below the query composer.
Our goal is to find the patients with the disease COVID, hence our query can be modified into
SELECT * FROM Patients WHERE disease = ‘COVID’
Here, ‘disease’ is a field or a field alias inside the items of the datasources.
To know more about Query Management, click here.
Kill a query
- To kill/stop a query, open the Query History tab and click on the Kill button.
- A pop-up will appear to confirm the process. Click on Kill to complete the action. The query will be stopped or killed.
- To know more, click here.
Add a User
- Click on the 'Add User' button in the workspace.
- One has the option to select from the list of existing users in the dropdown, or a new user can be added by entering the email address and sending them an invitation.
- Choose the User role, such as "Workspace Admin".
- Click on 'Add' to add the new user to the workspace.
- To know more about User Management, click here.