A dimension_schema
object is created, we have to define its name and the
set of attributes that make it up.
Usage
dimension_schema(
name = NULL,
attributes = NULL,
scd_nk = NULL,
scd_t0 = NULL,
scd_t1 = NULL,
scd_t2 = NULL,
scd_t3 = NULL,
scd_t6 = NULL,
is_when = FALSE,
...
)
Arguments
- name
A string, name of the dimension.
- attributes
A vector of attribute names.
- scd_nk
A vector of attribute names, scd natural key.
- scd_t0
A vector of attribute names, scd T0 attributes.
- scd_t1
A vector of attribute names, scd T1 attributes.
- scd_t2
A vector of attribute names, scd T2 attributes.
- scd_t3
A vector of attribute names, scd T3 attributes.
- scd_t6
A vector of attribute names, scd T6 attributes.
- is_when
A boolean, is when dimension.
- ...
When dimension configuration parameters.
Details
A dimension_schema
object is part of a star_schema
object, defines
a dimension of the star schema.
See also
Other star schema definition functions:
define_dimension()
,
define_facts()
,
fact_schema()
,
star_schema()
Examples
d <- dimension_schema(
name = "when",
attributes = c(
"Week Ending Date",
"WEEK",
"Year"
)
)