Combining OLAP Data and Other Data in the Same Analysis
Hierarchy values in a cube have both a caption and key. The key will always be unique, but the caption can be the same as for another hierarchy value. The key can be used for identifying a value. When you visualize data from an in-database cube in Spotfire, you may encounter cases where you cannot separate multiple instances of a value from each other (for example, when there are more than one city in the world with the same name (i.e., caption), like the case with Paris, France and Paris, Texas) in a visualization. In that case, you probably want to match values based on the keys, rather than on the values themselves. This is done by selecting the KeyOf method on the matching column of the cube directly.
Note: When you want to combine cube data and other data (for example, data from a relational database) you must have a column that matches the cube's KeyOf values in the relational data. The keys can often be exported from the cube to provide good matching.
Note: If a KeyOf-value is missing in a cube, an error message will be displayed in the visualization that shows the cube data. In the details for the error it will be indicated that an error occurred in the external data source. For example, this could occur if you configure a relation between a cube and a data table coming from another external system, and the data in the other system contains the key Hannover whereas the cube key is called Hanover. When Hannover is used in cube database queries, no key is found and an error is shown.
- Defining a New Relation Between a Relational Data Table and a Cube Data Source Using Keys
If you have data in a cube data source and want to be able to use this data to retrieve details about a certain value from a relational data source on demand, or if you simply want to be able to propagate markings from the cube data source to visualizations based on the relational source, you may want to define a relation between the two data tables. - Creating Column Matches Based on Keys to View Cube Data in the Same Visualization as Other Data
If you have two columns with the same dimension values in a cube data source as well as in a relational data source and you want to display the data in the same visualization you may need to apply theKeyOf
method to match the values.
- Defining a New Relation Between a Relational Data Table and a Cube Data Source Using Keys
If you have data in a cube data source and want to be able to use this data to retrieve details about a certain value from a relational data source on demand, or if you simply want to be able to propagate markings from the cube data source to visualizations based on the relational source, you may want to define a relation between the two data tables. - Creating Column Matches Based on Keys to View Cube Data in the Same Visualization as Other Data
If you have two columns with the same dimension values in a cube data source as well as in a relational data source and you want to display the data in the same visualization you may need to apply theKeyOf
method to match the values.
Parent topic: Introduction