These are chat archives for DataBrewery/cubes

11th
Sep 2017
Michael Schwab
@schwab
Sep 11 2017 15:08
Is it possible to join fields from 2 tables into a single dimension? In my case I have a fact table joined to a dim table (dim_drugs), which has a column which is a FK to another lookup table (dim_drug_admin). I'd like to create a single dimension that has levels from both the dim_drugs and dim_drug_admin table such that drill downs can be performed through hierarchy information from both tables. It seems this should be possible, but I haven't seen an examples which show how this could work. Is it possible to accomplish this or is the only solution to flatten the 2 dim tables into a single one with the cross product of data from both? (assume the dim_drug and dim_drug_admin tables are join on a unique id for instance)
Michael Schwab
@schwab
Sep 11 2017 17:35
Found a way to do this, for those who see it later. Under the schema's discussion in the docs there is a small section on Mappings. These allow columns to be combined from other tables into a single dimension. Works well.