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:

Time,Value1,Value2,Value3,Value4
C100,C1,C2,C3,C4
C200,C10,C20,C30,C40
90,91,92,93,94

The CSVDataD contains these data:

Time,Value1,Value2,Value3,Value4
D300,D31,D32,D33,D34
D400,D410,D420,D430,D440
90,91,92,93,94

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

Comments

0 comments

Please sign in to leave a comment.