Adding columns to a data table
If you are working with imported (in-memory) data, you can add columns to your current data table to create a join between data from different sources and merge it to a single data table. Data can be added from a local file, a data file previously saved in the Spotfire library (using the installed client), from data functions that produce data, from data connections saved in the library, or you can add data directly from Google Analytics or from Salesforce, if you have access to those systems. In the installed client you can also add data directly from other data sources using connectors, from information links, or from the clipboard.
About this task
Even though data from different data tables often can be viewed in the same visualization, it might be preferred to actually incorporate similar data into a single data table. When multiple data tables are used in one visualization, the join of the two tables is done after aggregation has been performed. Therefore, if you want to perform joining of tables before any aggregations, or, if you want to create certain calculated columns based on data from two sources, you might want to insert data from one table to the other.
You add data from the
Files and data flyout
or from the
Data canvas.
When you add data from the Files and data flyout, you can select to add the data as new columns in another data table from the final step in the add data workflow:
![](../../images/add_columns_from_summary_view.png)
You can also insert columns into a specific place in a data table structure, as described below.
Before you begin
Procedure
Example: Adding columns from Salesforce
In this example, data has already been opened from a local Excel file. In the Data canvas, select the data table of interest, determine where you want to add columns (between the nodes in the graphical structure or between transformation groups), and click Add columns:
![](../../images/add_columns_example.png)
Choose a new or a predefined connection to Salesforce and sign in. Select the data to add and click OK. In the Add columns – match columns dialog, verify that the suggested column matching is valid, or add or remove matches between columns From original data and From new data. When you are satisfied with the data selection and settings, click OK to close the flyout and add the data.
See also Adding a calculated column.