starschemar (version 1.2.0)

snake_case: Transform names according to the snake case style

Description

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

Run this code
# NOT RUN {
library(tidyr)

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()

# }

Run the code above in your browser using DataLab