tbl_everything() selects all the tables of a source. It’s what a Standard uses when neither it nor Standard.apply() has an applies_to= selector, so it’s mostly useful for clarity, or as the start of a selection that leaves some tables out (e.g., pb.tbl_everything() - pb.tbl_starts_with("tmp_")).
Returns
TableSelector
-
A table selector, which can be combined with other table selectors with
& (and), | (or), - (difference), and ~ (not).
Examples
A baseline standard often applies to every table but a few. Here, the scratch tables are left out:
import pointblank as pb
import polars as pl
tables = {
"orders": pl.DataFrame({"id": [1, 2]}),
"customers": pl.DataFrame({"id": [1, 2]}),
"tmp_scratch": pl.DataFrame({"id": [1, 1]}),
}
baseline_standard = pb.Standard(
name="baseline",
steps=[pb.Step("rows_distinct")],
applies_to=pb.tbl_everything() - pb.tbl_starts_with("tmp_"),
)
baseline_standard.find_tables(tables)
New tables are picked up the next time the standard is applied, unless their names start with "tmp_".