unify_facts_and_dimensions function

Unify facts and dimensions in a flat table