filter_fact_rows: Filter fact rows

View source: R/star_schema_filter_fact_rows.R

filter_fact_rowsR Documentation

Filter fact rows

Description

Filter fact rows based on dimension conditions in a star schema. Dimensions remain unchanged.

Usage

filter_fact_rows(st, name = NULL, ...)

## S3 method for class 'star_schema'
filter_fact_rows(st, name = NULL, ...)

Arguments

st

A star_schema object.

name

A string, name of the dimension.

...

Conditions, defined in exactly the same way as in dplyr::filter.

Details

Filtered rows can be deleted using the incremental_refresh_star_schema function.

Value

A star_schema object.

See Also

Other incremental refresh functions: get_star_schema(), get_star_schema_names(), incremental_refresh_constellation(), incremental_refresh_star_schema(), purge_dimensions_constellation(), purge_dimensions_star_schema()

Examples


st <- st_mrs_age |>
  filter_fact_rows(name = "when", week <= "03") |>
  filter_fact_rows(name = "where", city == "Bridgeport")

st2 <- st_mrs_age |>
  incremental_refresh_star_schema(st, existing = "delete")


josesamos/starschemar documentation built on May 6, 2024, 5:57 a.m.