2. Data - Load or connect


Everytime you load or connect your data, SelfBi creates a Data Definition. 

So, in the Data Definition you can find the specific data you have chosen to analyse, grouped into Data Names.
You can find it in the Data panel.

 Remember: Each Data Name contains all the data that, in the original source, are classified under that specific name of the column.



Contents

2.1 SelfBi Desktop and Server

 Designed to be easy: You can insert more Data Definitions in the same analysis. This means that you can load or connect more files, even if they come from different sources, in order to analyse them together.


Sources


The panel Choose the source type is the starting point to create a Data Definition. It opens when you:

  1. create a  New Data Definition in the Libraryor
  2. create a New Analysis, or

  3. click on Add in the Data panel in Edit, or

  4. open a saved analysis in which there are no data.

In the cases 2,3 and 4 the Data Definition belongs exclusively to the Analysis where you have created it. This means any change you make on data it affects directly the Data Definition.
This doesn't happen in the case 1: in fact when you connect a Data Definition from the Library, then you will work on its copy. 

Choose one of these sources in order to feed your Data Definition:

a. Spreadsheet


If you want to load data from any spreadsheet (including .xls/ .xlsx / .csv / .ods/ .tsv), you just have to choose the file needed and:

  • drag&drop it directly into the left box, or

  • click the right box to browse your folders and choose the file.

 Remember: you can load data from 1 sheet of the document at a time.

To load another sheet, create another Data Definition by clicking on  Add (in Edit).
After you have loaded the spreadsheet, the window Data Results opens. Now you can Select your data.

Update a spreadsheet

If you need to update data of a spreadsheet which contains the same columns of the previous one, you need only to drag and drop the new one.
In Edit, click on Manage in the Data panel, select the Data Definition you want to update and click Edit. You will see the window Results: click on Edit data selection: just drop your new file into the window Select data.   

b. Clipboard/Notes



Maybe your data have to be selected from a text list, or they are stored online. In this case, just select and copy your data, and

  • click on the box to paste them into the window that appears (for security reasons, SelfBi can’t directly hook into your saved clipboard/notes file).

You can see your data in the window Data Results. Now you can go to the Refining.

c. Database


1. Connect the server to SelfBi

 Remember to connect SelfBi to a server. If your server has been already connected, go to the paragraph 2

Click on Admin in the main header of SelfBi and select Connection Configurations Editor
Click the   button and write the name and the description of your new connection.

You can connect to the server in 3 different ways, depending on your driver, namely:

  1. ODBC
  2. JDBC
  3. other native drivers
ODBC connection

Choose one of the ODBC connections as Connection type. SelfBi shows you the list of your Data sources in the drop-down menu Database. Choose yours and input the Username and Password of your ODBC connection.

WARNING: If you haven't created the ODBC connection on your PC, you won't find the connection in the drop-down menu


To check if your data are correct, click  . If they are incorrect, you will be sent an error message. To clear all the data, click   and rewrite them. 

To save your connection, click  .
Now you have created your connection: make it Active by clicking on the button  .   

 Remember: Active connection means that you will find it as available connection in order to write your query when you choose the source Database in the panel Choose source type. If your connection is active, you can't modify its settings. To do that, deactivate it by clicking on the button  .

You will find the list of your connections in the upper section of the window, next to their Description and their status (Active).

JDBC connection

Choose Jdbc connection as Connection type and write your connection string. You can fill a template in order to write your string: to add it, open the drop-down menu Connection string template and select the string you need. 
If you want to check if your data are correct, click  . If they are incorrect, you will be sent an error message. To clear all the data, click   and rewrite them. 

To save your connection, click  .

Now you have created your connection: make it Active by clicking on the button  .   

 Remember: Active connection means that you will find it as available connection in order to write your query when you choose the source Database in the panel Choose source type. If your connection is active, you can't modify its settings. To do that, deactivate it by clicking on the button  .

You will find the list of your connections in the upper section of the window, next to their Description and their status (Active).

Other native drivers

Choose your driver in the drop-down menu Connection type and write your connection string. You can fill a template in order to write your string: to add it, open the drop-down menu Connection string template and select the string you need. 

If you want to check if your data are correct, click  . If they are incorrect, you will be sent an error message. To clear all the data, click   and rewrite them. 

To save your connection, click  .

Now you have created your connection: make it Active by clicking on the button  .   

 Remember: Active connection means that you will find it as available connection in order to write your query when you choose the source Database in the panel Choose source type. If your connection is active, you can't modify its settings. To do that, deactivate it by clicking on the button  .

You will find the list of your connections in the upper section of the window, next to their Description and their status (Active).

2. Connect your data to the Analysis

To create your Data Definition from a database, click on the box Database in the panel Choose the source type:

The window Set your Query appears: choose one of the connections you have previously set. Below, write the SQL query to extract your data.

After that, click on Go to real-time data results and you will see your data in real time.

Now you can see your data in the window Data Results.

3. Update your data

After the data connection, you are going to work in Edit on the data existing in your database at the time of your first data connection. If the data change in the database, SelfBi doesn't update them automatically, but it freezes a copy of those data so that you can still work on them. To synchronize data of your Analysis with the new data of your database, click  .

d. Join


Designed to be easy: joining two or more Data Definitions you can create a complete new one starting from more types of sources. For example, you can create a new Data Definition starting from files coming from a database and from a spreadsheet.

If you want to join more Data Definitions saved in the Library: 

Click on the box Join. The window Data Definition opens. First of all, you have to add at least two Data Definitions.
To add a new Data Definition, click the   button and Choose Data Definition from the list in the drop-down menu. In the section Source Name you can change the name of the Data Definition in the Join.
Then, click on Save source.
To delete a Data Definition, select it and click on the button   beside it.To modify the relations between the Data Definitions you have chosen, select one of them and click on  .

 Remember: when you select a Data Definition from the Data Definition panel, this one will be the Right Data Definition. The Left Data Definitions, instead, are the other ones. 

While you are adding the second Data Definition, you can already link the records of the Data Definitions.To do it, tick the records of the Left and Right Data Definition you want to relate: each colour represents linked records.

After that, you can select which data must be enclosed into the fields:  

  • None: select nothing
  • Select ALL the matching records between Master and Linked Data Definition
  • Select ALL records from Master Data Definition and matching records from Linked Data Definition
  • Select ALL records from Linked Data Definition and matching records from Master Data Definition
  • Select ALL records from both Data Definitions

When the relations are ready, you can build your own joined data Data Definition.
To do that, drag and drop or double click on the Data Names you need - even several times - into the section Fields. You can also move the whole Data Definition into this section. To see the newly created Data Definition, click on Go to real-time Results.

 Remember: if you change some settings of the panels Fields or Data Definition, you won't see the up-to-dated results until you click again Go to real-time results.

After choosing the fields that build your Data Definition, the window Data Results opens. If you need, you can change your selection.

e. Library


To connect your data from a Data Definition saved in your Library:

  • click on the box and write the title of your saved Data Definition in the bar.

WARNING: when you connect a Data Definition stored in the Library, you aren't going to modify that Data Definition directly, but you are going to work on its copy.

After you have connected your Data Definition from the Library, the window Data Results opens. If you need, you can change your selection.

2.2 SelfBi Online



 Designed to be easy: You can insert more Data Definitions in the same analysis. This means that you can load more files, even if they come from different sources, in order to analyse them together.


Sources



The panel Choose the source type is the starting point to create a Data Definition. It opens when you:

  1. create a  New Data Definition in the Libraryor
  2. create a New Analysis, or

  3. click on Add in the Data panel in Edit, or

  4. open a saved analysis in which there are no data.

In the cases 2,3 and 4 the Data Definition belongs exclusively to the Analysis where you have created it. This means any change you make on data it affects directly the Data Definition.
This doesn't happen in the case 1: in fact when you connect a Data Definition from the Library, then you will work on its copy. 

Choose one of these sources in order to feed your Data Definition:

a. Spreadsheet


If you want to load data in from any spreadsheet (including .xls/ .xlsx / .csv / .ods/ .tsv), you just have to choose the file needed and:


  • drag&drop it directly into the left box, or

  • click the right box to browse your folders and choose the file.

 Remember: you can load data from 1 sheet of the document at a time.

To load another sheet, create another Data Definition by clicking on  Add (in Edit).
After you have loaded the spreadsheet, the window Data Results opens. Now you can Select your data.

Update a spreadsheet

If you need to update data of a spreadsheet which contains the same columns of the previous one, you need only to drag and drop the new one.
In Edit, click on Manage in the Data panel, select the Data Definition you want to update and click Edit. You will see the window Results: click on Edit data selection: just drop your new file into the window Select data.   

b. Clipboard/Notes



Maybe your data have to be selected from a text list, or they are stored online. In this case, just select and copy your data, and

  • click on the box to paste them into the window that appears (for security reasons, SelfBi can’t directly hook into your saved clipboard/notes file).

You can see your data in the window Data Results. Now you can go to the Refining.

c. Join


Designed to be easy: joining two or more Data Definitions you can create a complete new one starting from more types of sources. For example, you can create a new Data Definition starting from files coming from a database and from a spreadsheet.

If you want to join more Data Definitions saved in the Library: 

Click on the box JoinThe window Data Definition opens. First of all, you have to add at least two Data Definitions.
To add a new Data Definitionclick the   button and Choose Data Definition from the list in the drop-down menu. In the section Source Name you can change the name of the Data Definition in the Join.
Then, click on Save source.
To delete a Data Definition, select it and click on the button   beside it.To modify the relations between the Data Definitions you have chosen, select one of them and click on  .

 Remember: when you select a Data Definition from the Data Definition panel, this one will be the Right Data Definition. The Left Data Definitions, instead, are the other ones. 

While you are adding the second Data Definition, you can already link the records of the Data Definitions.To do it, tick the records of the Left and Right Data Definition you want to relate: each colour represents linked records.

After that, you can select which data must be enclosed into the fields:  

  • None: select nothing
  • Select ALL the matching records between Master and Linked Data Definition
  • Select ALL records from Master Data Definition and matching records from Linked Data Definition
  • Select ALL records from Linked Data Definition and matching records from Master Data Definition
  • Select ALL records from both Data Definitions

When the relations are ready, you can build your own joined data Data Definition. 
To do that, drag and drop or double click on the Data Names you need - even several times - into the section Fields. You can also move the whole Data Definition into this section. To see the newly created Data Definition, click on Go to real-time Results.

 Remember: if you change some settings of the panels Fields or Data Definition, you won't see the up-to-dated results until you click again Go to real-time results.

After choosing the fields that build your Data Definition, the window Data Results opens. If you need, you can change your selection.

d. Library


To connect your data from a Data Definition saved in your Library:

  • click on the box and write the title of your saved Data Definition in the bar.

WARNING: when you connect a Data Definition stored in the Library, you aren't going to modify that Data Definition directly, but you are going to work on its copy.

After you have connected your Data Definition from the Library, the window Data Results opens. If you need, you can change your selection.