Adding Data Connections to an Analysis


Note: Which connectors you have access to is determined by the licenses set up by your Spotfire administrator. Some connectors also require that a driver is installed on the machine running Spotfire. See the system requirements at http://support.spotfire.com/sr.asp for details.

If data connections have been set up in advance you can add them directly from the library.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Shared Connection in Library.

  4. Tip: If you know the name of the connection you can type the name in the search field of the Add menu and it will directly show up in the list, under the header Shared Connection in Library.

    Response: The Select Data Connection dialog is opened.

  5. Browse to the connection of interest and click OK when it has been selected.

  6. Select which of the views in the data connection you want to add as new data tables by clearing or selecting the check boxes and then click OK in the Add Data Tables dialog.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Data Source in Library.

  4. Tip: If you know the name of the data source you can type the name in the search field of the Add menu and it will directly show up in the list, under the header Connection Data Source in Library.

    Response: The Select Data Source dialog is opened.

  5. Browse to the connection data source of interest and click OK when it has been selected.

  6. Response: If the selected data source is a relational database you will get the option to specify the views to include in the Views in Connection dialog. Make your choice and click OK. If the selected data source is a cube, then the data table will be directly added to the Add Data Tables dialog.

  7. Select which of the views in the data connection you want to add as new data tables by clearing or selecting the check boxes and then click OK in the Add Data Tables dialog.

Below are some examples of how certain types of connections are set up. Other connector types are set up in a similar fashion, but it may include fewer or additional steps.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Microsoft SQL Server.

  4. Response: The Microsoft SQL Server Connection dialog is opened.

  5. Specify the Server you want to connect to.

  6. Select Authentication method.

  7. If you selected SQL Server authentication, specify Username and Password.

  8. Click Connect.

  9. Response: Spotfire will connect to the specified server, and the databases that are available on the server will be listed in the Database drop-down list.

  10. Select the Database of interest.

  11. Click OK.

  12. Response: If the database you connect to contains a large number of tables, you will reach the Select Database Tables dialog which lets you limit the number of tables to work with, see step 9. Otherwise you will reach the Views in Connection dialog, see step 13.

  13. In the Available tables list, select one or more tables you that want to be able to work with in Spotfire.

  14. Click Add >.

  15. Response: The tables are moved from the Available tables list to the Selected tables list.

  16. Repeat step 9 and 10 until all the tables of interest have been moved to the Selected tables list.

  17. Comment: Retrieving the tables and their schemas from the database may take some time if you add a large number of tables. Therefore, it is recommended that you add only the tables you need to work with.

    Tip: Let Spotfire locate related tables for you. Select one or more interesting tables in the Selected tables list and then click on the Add Related Tables button. All tables that have a relation in the database to the selected tables will then be added to the list.

  18. Click OK.

  19. Response: The Views in Connection dialog is opened.

  20. In the Available tables in database list, double-click on the tables you want to be able to work with in Spotfire.

  21. Response: The tables are moved to the Views in Connection list. If you add a table with relations to other tables (a table with relations to other tables is indicated by an arrow to the left of its name), all related tables will automatically be included and the resulting view in Spotfire will be a joined virtual table with columns from all the related tables.  

    Comment: Click on a item in the Views in connection list to see the columns in the selected view.

  22. Click OK.

  23. Response: The connection with the selected views is added to the Data tables list in the Add Data Tables dialog.

  24. Select which of the available views should result in a new data table in the analysis by clearing or selecting the check boxes under Data tables and then click OK.

  25. Response: A connection to Microsoft SQL Server has now been added to the analysis. A default visualization is opened in Spotfire, and the selected data tables are ready to be used.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Teradata.

  4. Response: The Teradata Connection dialog is opened.

  5. Specify the Server you want to connect to.

  6. If desired, select Use data encryption.

  7. Select Authentication method.

  8. If you selected Teradata authentication, specify Username and Password.

  9. Click Connect.

  10. Response: Spotfire will connect to the specified server, and the databases that are available on the server will be listed in the Database drop-down list.

  11. Select the Database of interest.

  12. Click OK.

  13. Response: If the database you connect to contains a large number of tables, you will reach the Select Database Tables dialog which lets you limit the number of tables to work with, see step 10. Otherwise you will reach the Views in Connection dialog, see step 14.

  14. In the Available tables list, select one or more tables that you want to be able to work with in Spotfire.

  15. Click Add >.

  16. Response: The tables are moved from the Available tables list to the Selected tables list.

  17. Repeat step 10 and 11 until all the tables of interest have been moved to the Selected tables list.

  18. Comment: Retrieving the tables and their schemas from the database may take some time if you add a large number of tables. Therefore, it is recommended that you add only the tables you need to work with.

    Tip: Let Spotfire locate related tables for you. Select one or more interesting tables in the Selected tables list and then click on the Add Related Tables button. All tables that have a relation in the database to the selected tables will then be added to the list.

  19. Click OK.

  20. Response: The Views in Connection dialog is opened.

  21. In the Available tables in database list, double-click on the tables you want to be able to work with in Spotfire.

  22. Response: The tables are moved to the Views in Connection list. If you add a table with relations to other tables (a table with relations to other tables is indicated by an arrow to the left of its name), all related tables will automatically be included and the resulting view in Spotfire will be a joined virtual table with columns from all the related tables.

    Comment: Click on an item in the Views in connection list to see the columns in the selected view.

  23. Click OK.

  24. Response: The connection with the selected views is added to the Data tables list in the Add Data Tables dialog.

  25. Select which of the available views should result in a new data table in the analysis by clearing or selecting the check boxes under Data tables and then click OK.

  26. Response: A connection to Teradata has now been added to the analysis. A default visualization is opened in Spotfire, and the selected data tables are ready to be used.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Oracle.

  4. Response: The Oracle Connection dialog is opened.

  5. Specify the Server you want to connect to.

  6. Select whether to Connect using: SID or Service name.

  7. Select Authentication method.

  8. If you selected Oracle authentication, specify Username and Password.

  9. Click OK.

  10. Response: If the database you connect to contains a large number of tables, you will reach the Select Database Tables dialog which lets you limit the number of tables to work with, see step 8. Otherwise you will reach the Views in Connection dialog, see step 12.

  11. In the Available tables list, select one or more tables that you want to be able to work with in Spotfire.

  12. Click Add >.

  13. Response: The tables are moved from the Available tables list to the Selected tables list.

  14. Repeat step 8 and 9 until all the tables of interest have been moved to the Selected tables list.

  15. Comment: Retrieving the tables and their schemas from the database may take some time if you add a large number of tables. Therefore, it is recommended that you add only the tables you need to work with.

    Tip: Let Spotfire locate related tables for you. Select one or more interesting tables in the Selected tables list and then click on the Add Related Tables button. All tables that have a relation in the database to the selected tables will then be added to the list..

  16. Click OK.

  17. Response: The Views in Connection dialog is opened.

  18. In the Available tables in database list, double-click on the tables you want to be able to work with in Spotfire.

  19. Response: The tables are moved to the Views in Connection list. If you add a table with relations to other tables (a table with relations to other tables is indicated by an arrow to the left of its name), all related tables will automatically be included and the resulting view in Spotfire will be a joined virtual table with columns from all the related tables.

    Comment: Click on an item in the Views in connection list to see the columns in the selected view.

  20. Click OK.

  21. Response: The connection with the selected views is added to the Data tables list in the Add Data Tables dialog.

  22. Select which of the available views should result in a new data table in the analysis by clearing or selecting the check boxes under Data tables and then click OK.

  23. Response: A connection to Oracle has now been added to the analysis. A default visualization is opened in Spotfire, and the selected data tables are ready to be used.

  1. Select File > Add Data Tables....

  2. Response: The Add Data Tables dialog is displayed.

  3. Click Add > Connection To > Microsoft SQL Server Analysis Services.

  4. Response: The Microsoft SQL Server Analysis Services Connection dialog is opened.

  5. Specify the Server you want to connect to.

  6. Click Connect.

  7. Response: Spotfire will connect to the specified server, and the databases that are available on the server will be listed in the Database name drop-down list.

  8. Select the Database of interest.

  9. Select the Cube of interest.

  10. Click OK.

  11. Response: The connection with the selected cube is added to the Data tables list in the Add Data Tables dialog.

  12. Specify a descriptive Name for the connection.

  13. Click OK.

  14. Response: A connection to Microsoft SQL Server Analysis Services has now been added to the analysis, and a default visualization is opened in Spotfire.

This instruction is only applicable to relational connection data sources. Cubes are always treated as a single data table.

  1. Open the Views in Connection dialog.

  2. Under Relations, click New....

  3. Select the two data tables you want to connect from the Foreign key table and Primary key table drop-down lists.

  4. Select the columns containing the identifiers from the Column drop-down lists.

  5. You can specify a second pair of identifiers by selecting the check box Second column pair, and a third pair of identifiers by selecting the check box Third column pair.

  6. Click OK when you have specified the necessary identifiers.

  7. Response: A relation is created between the two tables. If you add the Foreign key table to the Views in connection list, then the columns in the Primary key table will be included automatically in the resulting view. To see which tables have a relation to a specific table, you can click on the arrow next to the table to expand the tree structure. Note that adding the Primary key table to the Views in connection list will not include the columns in the Foreign key table.

Note: Only structural relations defined in Spotfire can be deleted, not those set up by the database administrator. However, you can always add a database table to a connection view without including a related table by clearing the check box for the related table in the Views in connection list.

  1. Open the Views in Connection dialog.

  2. In the Available tables in database list, locate the table that is the foreign key table in the relation.

  3. Expand the tree view by clicking on the arrow next to it.

  4. Select the table in the expanded view.

  5. Comment: This is the table that was set up as the Primary key table when the relation was created.

    Response: The Delete button is enabled.

  6. Click on the Delete button.

  7. Response: The relation between the two tables is removed.

    Comment: Note that relations may include other relations so that deleting a relation for a one table may also affect the resulting number of columns in other views in the Views in connection list.

Note: Only structural relations defined in Spotfire can be edited, not those set up by the database administrator.

  1. Open the Views in Connection dialog.

  2. In the Available tables in database list, locate the table that is the foreign key table in the relation.

  3. Expand the tree view by clicking on the arrow next to it.

  4. Select the table in the expanded view.

  5. Comment: This is the table that was set up as the Primary key table when the relation was created.

    Response: The Edit... button is enabled.

  6. Click on the Edit... button.

  7. Make the desired changes in the Edit Relation dialog and click OK .

  8. Response: The relation is updated.

Note: You can also create relations between different data tables in Spotfire without actually joining them. This will form a looser connection between the tables but it can be used if you want to set up a details visualization using one of the data tables, limited by selections in the other. See Details on Manage Relations for more information.

See also:

Data Overview