starschemar (version 1.2.0)

reference_dimension: Reference a dimension

Description

Given a dimension, transform the fact table so that the attributes of the dimension indicated as a parameter, which are in the fact table, are replaced by the other attributes of the dimension.

Usage

reference_dimension(ft, dimension, attributes, conversion = TRUE)

# S3 method for fact_table reference_dimension(ft, dimension, attributes, conversion = TRUE)

Arguments

ft

A fact_table object.

dimension

A dimension_table object.

attributes

A vector of attribute names, attributes used to reference the dimension.

conversion

A boolean, indicates whether the attributes need to be transformed.

Value

A fact_table object.

Details

It is used to replace a set of attributes in the fact table with the generated key of the dimension.

If necessary, it is also used for the inverse operation: replace the generated key with the rest of attributes (dereference a dimension).