Adding Data Connections to an Analysis


Note: Which connectors you have access to is determined by the licenses set up by your Spotfire administrator. Most connectors also require that a driver is installed on the machine running Spotfire. See the system requirements at http://spotfi.re/sr/connectors for details. You can also view Getting Started with Connectors to learn more about getting access to connectors in Spotfire.

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

To add a predefined connection from the library:

  1. On the authoring bar, click Files and data .

  2. In the Files and data flyout, locate the connection of interest by searching for a suitable keyword or by browsing the Spotfire library.

  3. Click on the connection to select it.

    Response: A summary view showing all data tables that will be added or updated is displayed.

  4. You may have the option to change how to add the data or change how the data is loaded. When you are satisfied with the summary, click OK.

To add a data connection based on an existing data source from the library:

  1. On the authoring bar, click Files and data .

  2. In the Files and data flyout, locate the connection data source of interest by searching for a suitable keyword or by browsing the Spotfire library.

  3. Click on the data source to select it.

  4. In the Data Connection Login dialog, enter your Username and Password and click Connect.

    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.

  5. You may have the option to change how to add the data or change how the data is loaded. When you are satisfied with the summary, click OK.

Embedded Data Sources and Connections

You can also add data connections that are embedded in the analysis file instead of using shared sources. 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.

To add a connection to relational or other non-cube data sources:

In this example, the data connection is based on Microsoft SQL Server data, but the process for adding data connections from other cube data sources is quite similar.

  1. On the authoring bar, click Files and data .

  2. Click Connect to > Microsoft SQL Server.

  3. In the expanded flyout to the right, click New connection.

    Response: The Microsoft SQL Server Connection dialog is opened.

  4. Specify the Server you want to connect to.

  5. Select Authentication method.

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

  7. Click Connect.

    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.

  8. Select the Database of interest.

  9. Click OK.

    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.

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

  11. Click Add >.

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

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

    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.

  13. Click OK.

    Response: The Views in Connection dialog is opened.

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

    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. See also Structural Relations.

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

  15. If desired, you can specify that a certain view should be available as external data only, or as imported data only. Right-click on the bold view name and select Load Method and the desired option. Repeat for other views.

  16. Click OK.

    Response: The connection with the selected views is added to the summary view in the flyout.

  17. You may have the option to change how to add the data or change how the data is loaded. When you are satisfied with the summary, click OK.

    Response: A connection to Microsoft SQL Server has now been added to the analysis and the selected data tables are ready to be used.

To add a connection to a cube data source:

In this example, the data connection is based on a Microsoft SQL Server Analysis Services cube, but the process for adding connections from Essbase or SAP BW cubes is quite similar.

  1. On the authoring bar, click Files and data .

  2. Click Connect to > Microsoft SQL Server Analysis Services.

  3. In the expanded flyout to the right, click New connection.

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

  4. Specify the Server you want to connect to.

  5. Click Connect.

    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.

  6. Select the Database of interest.

  7. Select the Cube of interest.

  8. Click OK.

    Response: The Data Selection in Connection dialog is displayed.

  9. Click to select data of interest in the panel to the left.

    Comment: Click on the top level to select the entire cube. This is generally not recommended when you intend to import data.

    Comment: For Microsoft SQL Server Analysis Services, you can limit what is shown in the panel by selecting a single measure group, or by typing a search term in the search field.

  10. Click Add > to move the selected data to the Data selection in connection field.

  11. If desired, you can limit the selected data further by clicking on a dimension and, in the Settings pane, clicking Limit....

    Comment: This way, you can filter out certain values of the dimension to only include values of interest. For example, you can select data from a single country only. Note that it is not possible to limit measures, only dimensions, because the cube calculates the measures in the context of the selected dimensions.

  12. If desired, you can specify that the data in this connection should be available as external data only, or as imported data only. Right-click on the cube name and select Load Method and the desired option.

  13. When you are done with the data selection, click OK.

    Response: The connection with the selected cube is added to the summary view in the flyout.

  14. You may have the option to change how to add the data or change how the data is loaded. When you are satisfied with the summary, click OK.

  15. Response: A connection to Microsoft SQL Server Analysis Services has now been added to the analysis.

Tip: In the Data Selection in Connection dialog, you can double-click on a collapsed item to expand it, or you can double-click on a leaf node to directly send it to the Data selection in connection list.

See also:

Data Overview

Adding Prompts to Data Connections

Connecting to Stored Procedures Using Data Connections

Importing Data from Cubes