Replacing Data


In Spotfire it is possible to reuse the visualizations, calculations and setup from a previously created document with new data, as long as the new data is reasonably similar to the old data. This is useful when creating an analysis for, say, sales figures for a certain month. You create a full analysis using the data from January, set up visualizations, calculations, etc., and save the file. When the sales figures for February are available, you can open the same file again, and replace the data from January with the data from February, and the visualizations will be updated. This of course requires that the data table for February is structured in the same way as for January, using the same column names and format.

  1. Select File > Replace Data Table....

    Response: The Replace Data Table – Select Data Table dialog is displayed.

  2. Select the data table you wish to replace.

  3. Select to replace with a New data table.

  4. Click OK.

  5. Response: The Replace Data Table – Select Source dialog is opened.

  6. Select source type for the new data table.

  7. If the selected data type is anything other than the clipboard, click Browse... to specify the source.

    Response: Depending on which option you have selected, you are provided with some means to choose what data to open. See Opening a Text File, Opening an Excel File, Opening a SAS File, Opening an Information Link, or Opening Data from a Database for more information about each alternative.

  8. Apply transformations (optional). See Transforming Data to learn more.

  9. Click OK.

  10. Response: If the new data table contains columns that match the columns in the old data table completely, the analysis is immediately updated to use the new data. However, if some columns used in the analysis could not be replaced automatically by columns in the new data table, you will be presented with the Replace Data – Match Columns dialog. Here, you can match columns from the current data table with columns from the new data table. If there are missing columns remaining after you have matched columns, the Replace Data – Missing Columns dialog is shown. The dialog will state all mismatches that still occur. Make a note of these and click Close. The data is replaced, but you may need to make some manual fixes to make sure all visualizations are displayed as you intended.

  11. If necessary, update any visualizations, calculations, or hierarchies that were broken when the data was replaced.

  1. Select File > Replace Data Table....

    Response: The Replace Data Table – Select Data Table dialog is displayed.

  2. Select the data table you wish to replace.

  3. Select to replace with a New data table loaded on demand.

  4. Click OK.

  5. Response: The Select Information Link dialog is opened.

  6. Locate and select the information link of interest.

  7. Click OK.

  8. The Replace Data Table – On Demand Configuration dialog is opened.

  9. Specify how the on-demand data should be loaded. See Loading Data on Demand to learn more.

  10. Click OK.

  11. Response: If the new data table contains columns that match the columns in the old data table completely, the analysis is immediately updated to use the new data. However, if some columns used in the analysis could not be replaced automatically by columns in the new data table, you will be presented with the Replace Data – Match Columns dialog. Here, you can match columns from the current data table with columns from the new data table. If there are missing columns remaining after you have matched columns, the Replace Data – Missing Columns dialog is shown. The dialog will state all mismatches that still occur. Make a note of these and click Close. The data is replaced, but you may need to make some manual fixes to make sure all visualizations are displayed as you intended.

  12. If necessary, update any visualizations, calculations, or hierarchies that were broken when the data was replaced.

This option is used when you want to create an entirely new data connection and use one of the data tables within it instead of an old data table.

Note: Cube data cannot be replaced.

  1. Select File > Replace Data Table....

    Response: The Replace Data Table – Select Data Table dialog is displayed.

  2. Select the data table you wish to replace.

  3. Select to replace with Data table from data connection.

  4. Click OK.

  5. Response: The Replace Data Table – Select External Source dialog is opened.

  6. Click the radio button A new table in a new data connection.

  7. Select the type of data source you want to connect to in the drop-down list.

  8. Click OK.

  9. Response: The connection dialog for the selected data source type is opened.

  10. Set up the data connection and select the table to replace the old data table with.

  11. Comment: See To_add_a_connection_to_Microsoft_SQL_Server, To_add_a_connection_to_Oracle, or To_add_a_connection_to_Teradata for detailed descriptions of how to load data from the different data sources.

    Response: If the new data table contains columns that match the columns in the old data table completely, the analysis is immediately updated to use the new data. However, if some columns used in the analysis could not be replaced automatically by columns in the new data table, you will be presented with the Replace Data – Match Columns dialog. Here, you can match columns from the current data table with columns from the new data table. If there are missing columns remaining after you have matched columns, the Replace Data – Missing Columns dialog is shown. The dialog will state all mismatches that still occur. Make a note of these and click Close. The data is replaced, but you may need to make some manual fixes to make sure all visualizations are displayed as you intended.

  12. If necessary, update any visualizations, calculations, or hierarchies that were broken when the data was replaced.

This option is used when you want to add a new data table to an existing data connection and use the new data table instead of an old data table.

Note: Cube data cannot be replaced.

  1. Select File > Replace Data Table....

    Response: The Replace Data Table – Select Data Table dialog is displayed.

  2. Select the data table you wish to replace.

  3. Select to replace with Data table from data connection.

  4. Click OK.

  5. Response: The Replace Data Table – Select External Source dialog is opened.

  6. Click the radio button A new table in an existing connection.

  7. In the drop-down list, select the connection to which you want to add a new table.

  8. Click OK.

  9. Response: The Data Tables in Connection dialog is opened.

  10. In the Available tables in database list, select the new table to use, and click Add >.

  11. Tip: See To add relations or To edit an existing relation if you want to learn more about adding or editing relations between tables.

    Comment: If the database contains a large number of tables, it may be the case that all tables have not been added to the connection when it was initially created. If the table you want to replace with is not shown in the Available tables in database list, click Edit Tables... to open the Select Database Tables dialog where you can add the table of interest. However, you need to have sufficient permissions in the database to be able to do this.

  12. Click OK.

  13. Response: If the new data table contains columns that match the columns in the old data table completely, the analysis is immediately updated to use the new data. However, if some columns used in the analysis could not be replaced automatically by columns in the new data table, you will be presented with the Replace Data – Match Columns dialog. Here, you can match columns from the current data table with columns from the new data table. If there are missing columns remaining after you have matched columns, the Replace Data – Missing Columns dialog is shown. The dialog will state all mismatches that still occur. Make a note of these and click Close. The data is replaced, but you may need to make some manual fixes to make sure all visualizations are displayed as you intended. The new table has also been added to the selected connection. To view the current setup of the data connection, open the Data Connection Properties dialog.

  14. If necessary, update any visualizations, calculations, or hierarchies that were broken when the data was replaced.

Note: Cube data cannot be replaced.

  1. Select File > Replace Data Table....

    Response: The Replace Data Table – Select Data Table dialog is displayed.

  2. Select the data table you wish to replace.

  3. Select to replace with Data table from data connection.

  4. Click OK.

  5. Response: The Replace Data Table – Select External Source dialog is opened.

  6. Click the radio button An existing external table in my analysis.

  7. In the drop-down list, select the table you want to replace the current table with.

  8. Click OK.

  9. Response: If the new data table contains columns that match the columns in the old data table completely, the analysis is immediately updated to use the new data. However, if some columns used in the analysis could not be replaced automatically by columns in the new data table, you will be presented with the Replace Data – Match Columns dialog. Here, you can match columns from the current data table with columns from the new data table. If there are missing columns remaining after you have matched columns, the Replace Data – Missing Columns dialog is shown. The dialog will state all mismatches that still occur. Make a note of these and click Close. The data is replaced, but you may need to make some manual fixes to make sure all visualizations are displayed as you intended.

  10. If necessary, update any visualizations, calculations, or hierarchies that were broken when the data was replaced.

See also:

Transforming Data