UNION of two data sources directly in Data Discovery

Suppose you have two data sources - in this example, two CSV files - that are identical in structure, but with different data sets.

You would like to combine these two data sources into a single data source - similar to doing a UNION of two tables.

The CSVdataC file contains these data:


The CSVDataD contains these data:


First, you will need to create these as two separate data sources in Data Discovery, using the CSV data source plugin (only CSV C data source shown here):

Also, you will need to create a Format for each data source. The purpose of the Format is to add an extra  'Type' column to designate data as coming from either source C or source D:

Having done that, you can now create a cube based on the two Formats:

Notice that both tables have been marked as 'Fact' tables.

From this cube, you can now create a table (notice, a simple table, not a cross table) where you insert all the fields as dimension values from the leftmost table (the table where the joins originate from, the C table in this example).

This is essentially the UNION result of the two data sources.

With the table done, save the dashboard. You can now use this table as a TARGIT data source for a new cube with a single fact table with the unioned data.


Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.