Skip to contents

Transform fact, dimension, measurement, and attribute names according to the snake case style.

Usage

snake_case(st)

# S3 method for star_schema
snake_case(st)

Arguments

st

A star_schema object.

Value

A star_schema object.

Details

This style is suitable if we are going to work with databases.

See also

Other star schema and constellation definition functions: character_dimensions(), constellation(), role_playing_dimension(), star_schema()

Examples


st <- star_schema(mrs_age, dm_mrs_age) |>
  snake_case()

st <- star_schema(mrs_age, dm_mrs_age) |>
  role_playing_dimension(
    dim_names = c("when", "when_available"),
    name = "When Common",
    attributes = c("Date", "Week", "Year")
  ) |>
  snake_case()