The sanity checks: what each one finds¶
This page lists every check of tdfs4ds.sanity_check and every finding it can raise: what it detects, why it matters, an example, how severe it is and the call that fixes it. For how to run the checks and read the report see Sanity checks; for the order in which to fix findings see Assess workflow health.
Use with expert review
The sanity checks are not exhaustive and may report false positives. A finding is a lead for an expert to investigate: the checks support experts, they do not replace them. An absent finding is not proof that everything is well.
How to read it¶
- Code only. No language model, nothing is executed, nothing is changed. A finding names the command that fixes it and never runs it.
- Severity.
error: the pipeline is wrong or cannot work.warning: it works today and is likely to hurt, or a refresh may not reproduce the data.info: an observation to confirm. Not verified: a read failed or was not allowed; it is listed apart and is never a pass. - Scope.
cheap(default) reads catalogs, the data dictionary, the lineage graph and the follow-up table.fulladds the checks that read storage tables. - Problem or opportunity. Each entry says which it is: a problem (something is wrong or will be), an improvement opportunity or observation (info: the pipeline works, it could be better or simply needs confirming), or a limited view (the check could not see enough).
import tdfs4ds
path = tdfs4ds.sanity_check('sanity_report.html') # cheap scope
path = tdfs4ds.sanity_check('sanity_full.md', scope='full', data_domains=['SALES']) # adds the storage reads
The checks at a glance¶
| Check | Area | Scope | What it looks for |
|---|---|---|---|
integrity |
Lineage and integrity; Datasets | cheap | Registered objects whose view, table or feature is gone |
network |
Lineage network | cheap | Views that do not compile, isolated or dead lineage |
dataset_rows |
Datasets | full | Dataset features with no rows, grain not unique, reverted relocations |
entity_scan |
Entity keys | full | Key columns that change or are redundant (reads storage) |
entity_layout |
Entity keys; Storage layout | cheap | Key supersets, column types that differ between tables |
order |
Order and time synchronisation | cheap | Runs out of order, on failed or empty upstream, managers not aligned |
clock |
Clock and calendar | cheap | Clock behind, calendar off its rule, orphan managers |
windows |
Windows | cheap | Hand-written, fixed or mismatched windows |
leakage |
Inputs in time | cheap | Point-in-time leaks |
segments |
Runs and segments | cheap | Failed, missing, stuck or interrupted runs, hollow runs |
usage |
Refresh by run() and roll_out() | cheap | Loops and edits around run() |
closed_entities |
Refresh by run() and roll_out() | cheap (EXPLAIN-gated) | Entities closed or gaps made outside a run (reads storage) |
sql |
Process SQL | cheap | SQL drift and versions |
skew |
Storage layout | cheap | Skewed storage tables |
distribution |
Storage layout; Partition pruning | cheap | Primary index, partitioning, pruning, statistics against the largest source |
dbc_space |
Database space | cheap | DBC nearly full |
metadata_time |
Metadata time, documentation and glossary | cheap | Catalog rows valid from the future |
glossary |
Metadata time, documentation and glossary | cheap | Glossary terms valid from the future |
documentation_valid_time |
Metadata time, documentation and glossary | cheap | Documentation valid from the future |
documentation_confidence |
Metadata time, documentation and glossary | cheap | How far generated text can be trusted |
feature_properties |
Feature values and sensitivity | full | Values outside declared properties, sensitive features in datasets |
server_batch |
Server-side batch | cheap | Server-side batch objects |
tdfs4ds.migration.sanity.check_names('full') returns the 22 checks; 'cheap' returns 19 (the cheap set plus closed_entities).
The areas, with their counts¶
| Area | Finding kinds |
|---|---|
| Lineage and integrity | 7 |
| Lineage network | 11 |
| Datasets | 9 |
| Entity keys | 4 |
| Order and time synchronisation | 16 |
| Clock and calendar | 7 |
| Windows | 3 |
| Inputs in time (leakage) | 3 |
| Runs and segments | 5 |
| Refresh by run() and roll_out() | 7 |
| Process SQL | 2 |
| Storage layout | 7 |
| Partition pruning | 10 |
| Database space | 1 |
| Metadata time, documentation and glossary | 7 |
| Feature values and sensitivity | 2 |
| Server-side batch | 4 |
| Total | 105 |
Lineage and integrity¶
What the process and dataset views read still exists and compiles, and the lineage graph is complete.
process_view_missing¶
- Detects: Process whose view no longer exists.
- Why it matters: run() has no view to read, so the process can never refresh, and everything reading its features goes stale.
- Example: PROC_A is registered but
DB.V_PROC_Awas dropped by hand. The finding names the view; restore it or remove the process. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: restore the view, or
plan_removal.
process_view_broken¶
- Detects: Process view that no longer compiles.
- Why it matters: The view exists but fails to compile (a source column was renamed, a source dropped): every run fails.
- Example:
V_PROC_AreadsSRC.ORDERS.AMOUNT, renamed toAMOUNT_EUR. EXPLAIN fails; fix the view or restore the column. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: fix the view, or
plan_removal.
process_reads_missing_object¶
- Detects: Process view reading an object that no longer exists.
- Why it matters: A source of the process no longer exists, so the next run fails, and it fails far from the cause.
- Example:
V_PROC_AreadsSRC.CUSTOMER_X, which was dropped. The finding names it. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: restore the object, or
plan_removal.
process_reads_inaccessible_object¶
- Detects: Process view reading an object this user has no right on.
- Why it matters: The view may work for its owner but this user cannot read what it reads: the check cannot tell whether the process is sound.
- Example: The assessing user has no SELECT on
SRC.ORDERS. The finding names the right to ask for; assess again after the GRANT. - Check and severity:
integrity, warning. Kind of finding: not verified or limited view. - Fix: ask for the SELECT the finding names, assess again.
process_reads_unregistered_dataset¶
- Detects: Process view reading a dataset no longer registered.
- Why it matters: A dataset the process reads is no longer in the dataset catalog, so the lineage and the agent no longer know it.
- Example:
V_PROC_BreadsDS_CUSTOMER, whose catalog row was lost.restore_dataset_catalog(dry_run=True)shows what would be registered again. - Check and severity:
integrity, warning. Kind of finding: problem. - Fix:
restore_dataset_catalog(dry_run=True), or rewrite the view.
feature_without_process¶
- Detects: Feature no process computes any more.
- Why it matters: The feature is still in the catalog and datasets may read it, but nothing refreshes it: its values freeze while looking current.
- Example: FEATURE_X was computed by PROC_A, removed last month. Datasets still expose FEATURE_X. Register a process again or remove the feature.
- Check and severity:
integrity, warning. Kind of finding: problem. - Fix: register a process computing it again, or
plan_removal.
lineage_edge_to_unknown¶
- Detects: Lineage edge to a view that is no registered process.
- Why it matters: The graph points to a view that is no registered process, often a view renamed or recreated; impact analysis is incomplete.
- Example: An edge leads to
V_OLD_NAME. Re-record the lineage of the object (rebuild_lineage_graph(objects=[...])). - Check and severity:
integrity, info. Kind of finding: improvement opportunity or observation. - Fix:
rebuild_lineage_graph(objects=[...], check=False).
Lineage network¶
The lineage seen as a whole: does every view compile, is it in one piece, what is dead.
view_does_not_compile¶
- Detects: View that does not compile (EXPLAIN fails).
- Why it matters: A broken view breaks every process and dataset above it; only the root failure is reported so you fix one thing, not ten.
- Example:
V_BASEfails EXPLAIN;V_PROC_A,V_PROC_BandDS_CUSTOMERread it and are listed under it. - Check and severity:
network, error. Kind of finding: problem. - Fix: fix or restore the view (only the root failure is reported).
view_not_verifiable¶
- Detects: View this user may not EXPLAIN (missing right): not verified.
- Why it matters: The user lacks the right to EXPLAIN the view: it is not verified, not reported as broken.
- Example: EXPLAIN of
V_SECUREis refused with a missing right; the finding names the GRANT. - Check and severity:
network, warning. Kind of finding: not verified or limited view. - Fix: the GRANT the finding names.
views_not_compiled¶
- Detects: Views not compiled (over the limit).
- Why it matters: There are more views than the limit, so some were not compiled: a pass here would be wrong.
- Example: 800 views, limit reached: assess a smaller scope (a data domain or a list of processes).
- Check and severity:
network, info. Kind of finding: not verified or limited view. - Fix: assess a smaller scope.
lineage_split¶
- Detects: Lineage made of separate networks.
- Why it matters: The lineage is several separate networks. That is normal for independent pipelines; a process meant to read another should be in its network.
- Example: Two networks: SALES and RISK. Expected. If PROC_C should read a SALES dataset but sits alone, a link is missing.
- Check and severity:
network, info. Kind of finding: not verified or limited view. - Fix: check that no process is missing a link (independent pipelines are expected).
lineage_isolated¶
- Detects: Process or dataset with no lineage link.
- Why it matters: A process or dataset with no lineage link is invisible to impact analysis and downstream guards.
- Example: PROC_D has no edge in
FS_LINEAGE_GRAPH. Record it withrebuild_lineage_graph(objects=[...], check=True). - Check and severity:
network, warning. Kind of finding: problem. - Fix:
rebuild_lineage_graph(objects=[...], check=True).
lineage_not_recorded¶
- Detects: View whose inputs the lineage graph does not record.
- Why it matters: The graph does not hold the inputs of a view that can be read: lineage and impact studies miss them.
- Example:
V_STEPis readable but the graph has no edge to its sources. Re-record the lineage of the object. - Check and severity:
network, warning. Kind of finding: problem. - Fix:
rebuild_lineage_graph(objects=[...], check=True).
lineage_stops_no_access¶
- Detects: Lineage stopping at a view whose definition this user cannot read.
- Why it matters: Lineage ends at a view whose definition this user cannot read: what lies above it is unknown.
- Example: Lineage stops at
V_SECURE; the finding names the GRANT SHOW VIEW needs. - Check and severity:
network, warning. Kind of finding: not verified or limited view. - Fix: the GRANT named, then
rebuild_lineage_graph(objects=[...], check=True).
lineage_stops_unreadable¶
- Detects: Lineage stopping at a view SHOW VIEW refuses.
- Why it matters: Lineage ends at a view SHOW VIEW refuses, for a reason other than a missing right.
- Example: SHOW VIEW of
V_Xreturns an error; the finding carries the database message in full. - Check and severity:
network, warning. Kind of finding: not verified or limited view. - Fix: read the message in the finding.
source_table_not_readable¶
- Detects: Source table this user cannot read (read through views).
- Why it matters: A source table cannot be read by this user. Often intended (an access layer of views), so only an information.
- Example:
SRC.ORDERSis read throughV_ORDERS; no action when that is the design. - Check and severity:
network, info. Kind of finding: improvement opportunity or observation. - Fix: nothing when an access layer of views is intended.
process_not_read¶
- Detects: Process nobody reads (dead end).
- Why it matters: A process nobody reads computes features for no consumer (cost without use), or a dataset is missing.
- Example: PROC_E is read by no dataset and no other process. Build a dataset on it or remove it.
- Check and severity:
network, info. Kind of finding: improvement opportunity or observation. - Fix: build a dataset on its features, or
plan_removal.
detached_branch¶
- Detects: Lineage branch no process or dataset reads (dead branch).
- Why it matters: Views and tables that no registered process or dataset reaches are usually left by a removed process.
- Example:
V_OLD_STEPandT_OLDremain after PROC_OLD was removed. Drop them, then rebuild the lineage. - Check and severity:
network, info. Kind of finding: improvement opportunity or observation. - Fix: drop the unused views, then
rebuild_lineage_graph.
Datasets¶
A dataset that compiles can still read nothing, or the wrong table, or too many rows.
dataset_view_missing¶
- Detects: Dataset whose view no longer exists.
- Why it matters: The dataset is registered but its view is gone: every reader of it fails.
- Example:
DS_CUSTOMERis in the catalog,DB.DS_CUSTOMERwas dropped. The fix removes its catalog entry (or recreate the view). - Check and severity:
integrity, error. Kind of finding: problem. - Fix: remove its catalog entry with the removal plan, or recreate the view.
dataset_reads_removed_process¶
- Detects: Dataset reading the values of a removed process.
- Why it matters: The dataset reads values written by a process that no longer exists: they will never be refreshed.
- Example:
DS_CUSTOMERreads FEATURE_VERSION of PROC_OLD, removed. Rebuild the dataset on a registered process. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: rebuild the dataset on a registered process, or
plan_removal.
dataset_reads_removed_feature¶
- Detects: Dataset reading a feature removed from the catalog.
- Why it matters: A feature removed from the catalog is still read by the dataset: the column is empty or stale.
- Example: FEATURE_X was removed;
DS_CUSTOMERstill reads its FEATURE_ID. Rebuild the dataset on current features. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: rebuild the dataset on current features, or
plan_removal.
dataset_reads_stale_table¶
- Detects: Dataset reading a storage table the catalog no longer uses for the feature.
- Why it matters: A type change moves a feature to another storage table; a dataset still reading the old table gets old values. It compiles, so nothing else warns you.
- Example: FEATURE_X moved from
FS_T_..._AtoFS_T_..._B.rewrite_dataset_tables(dataset, dry_run=True)shows the new DDL, keeping the name and DATASET_ID. - Check and severity:
integrity, error. Kind of finding: problem. - Fix:
rewrite_dataset_tables(dataset, dry_run=True), or rebuild the dataset.
dataset_reads_missing_table¶
- Detects: Dataset reading a storage table that no longer exists.
- Why it matters: The dataset reads a storage table that is gone: reads fail or return nothing.
- Example:
DS_CUSTOMERreadsFS_T_..._A, dropped by mistake. Restore the table or rebuild the dataset. - Check and severity:
integrity, error. Kind of finding: problem. - Fix: restore the table, or rebuild the dataset.
dataset_reads_other_store¶
- Detects: Dataset reading another feature store (not checked from this one).
- Why it matters: A dataset reads another feature store this session does not see: the checks cannot verify it.
- Example:
DS_CUSTOMERreads a feature of store LAB_FS. Attach it withconnect(..., databases_readonly=['LAB_FS'])and assess again. - Check and severity:
integrity, info. Kind of finding: not verified or limited view. - Fix:
connect(..., databases_readonly=[...])and assess again.
dataset_feature_no_rows¶
- Detects: Dataset feature with no stored rows.
- Why it matters: A dataset view whose feature has no rows still compiles: an INNER dataset returns nothing, a FULL OUTER dataset a column of NULL.
- Example: FEATURE_X was registered but PROC_A never completed a run.
DS_CUSTOMER(INNER) is empty: error. Run the process. - Check and severity:
dataset_rows, error (INNER dataset), warning (FULL OUTER). Kind of finding: problem. - Fix: run the producing process, or rebuild the dataset without the feature.
dataset_grain_not_unique¶
- Detects: Dataset reading a feature stored with a wider key, not unique at the dataset's grain.
- Why it matters: A feature stored at a wider key than the dataset's repeats for one entity: the dataset returns several rows per entity.
- Example: FEATURE_X is stored by (CUSTOMER_ID, REGION);
DS_CUSTOMERis keyed on CUSTOMER_ID and 120 customers have two regions. Key the dataset on the full entity or leave the feature out. - Check and severity:
dataset_rows, error. Kind of finding: problem. - Fix: rebuild the dataset without these features, or key it on the full entity; if the extra column is a segment the data does not keep to one value per entity, the primary index is not the real grain.
relocation_reverted¶
- Detects: Relocated feature registered or written in its old table again (older client).
- Why it matters: An older client registered a relocated feature again and wrote to the old table: the history is split over two tables.
- Example: FEATURE_X was relocated to its own table; a 0.3.3.29 client re-registered it. Upgrade that client, then relocate again.
- Check and severity:
dataset_rows, error. Kind of finding: problem. - Fix: upgrade the older client, then
plan_relocationandrelocate_featuresagain.
Entity keys¶
Is the entity key what the data says it is?
key_column_changes_over_time¶
- Detects: Entity column that changes over time.
- Why it matters: An entity column that changes for the same entity splits its history: the entity is not what the key says.
- Example: Key (CUSTOMER_ID, SEGMENT); SEGMENT changes for 12% of customers. Store SEGMENT as a feature.
- Check and severity:
entity_scan, warning (info under 100 entity tuples). Kind of finding: problem. - Fix: store the column as a feature, or remove it from
entity_id(suggested key in the finding).
redundant_key_column¶
- Detects: Entity column determined by the other key columns.
- Why it matters: A column the other key columns already determine widens the key for nothing: extra storage, joins and a wider primary index.
- Example: Key (CUSTOMER_ID, REGION): CUSTOMER_ID determines REGION. Register with CUSTOMER_ID alone, keep REGION as a feature.
- Check and severity:
entity_scan, warning (info under 100 entity tuples). Kind of finding: problem. - Fix: register the processes of the entity with the suggested
entity_id; keep the dropped column as a feature (remove and register again).
entity_key_superset¶
- Detects: Entity key containing another entity key.
- Why it matters: An entity key containing another key may be the same entity at two grains; datasets then mix grains.
- Example: (CUSTOMER_ID) and (CUSTOMER_ID, ACCOUNT_ID) coexist. Run the entity scan to see whether ACCOUNT_ID is redundant.
- Check and severity:
entity_layout, info. Kind of finding: improvement opportunity or observation. - Fix: run the entity scan; if the extra columns are redundant, register at the smaller key.
entity_column_type_mismatch¶
- Detects: Entity column typed differently across tables.
- Why it matters: The same entity column typed differently across storage tables makes joins cast or fail and prevents a common primary index.
- Example: CUSTOMER_ID is INTEGER in one table and VARCHAR(20) in another. Cast to one type in the process views.
- Check and severity:
entity_layout, warning. Kind of finding: problem. - Fix: cast the column to one type in the process views, register again.
Order and time synchronisation¶
Did processes run in dependency order, and do they share the same business dates?
ran_before_upstream¶
- Detects: Process started before its upstream had finished.
- Why it matters: A process that starts before its upstream ends reads yesterday's inputs.
- Example: PROC_B started at 02:00, PROC_A (its upstream) ended at 02:40. Run in dependency order, then re-run PROC_B with force_compute.
- Check and severity:
order, warning. Kind of finding: problem. - Fix: run in dependency order (
generate_execution_script), then re-run withforce_compute=True.
upstream_recomputed_after¶
- Detects: Upstream recomputed after the process ran.
- Why it matters: The process computed on inputs that were later rewritten: its values are out of date.
- Example: PROC_A was recomputed for 2026-03-31 after PROC_B ran. Roll PROC_B out again over those dates with force_compute.
- Check and severity:
order, warning. Kind of finding: problem. - Fix:
roll_outthe process over those dates withforce_compute=True.
upstream_missing_at_date¶
- Detects: Upstream not computed at the process's business date.
- Why it matters: A process completed at a business date its upstream never computed: it read nothing, or an older value.
- Example: PROC_B has 2026-03-31, PROC_A stops at 2026-03-30. Roll PROC_A out to that date, re-run PROC_B.
- Check and severity:
order, warning. Kind of finding: problem. - Fix: roll the upstream out over those dates, then re-run the process with
force_compute=True.
completed_on_failed_upstream¶
- Detects: Process completed on a failed upstream.
- Why it matters: The process wrote values computed on failed inputs and says COMPLETED: wrong values with no alert.
- Example: PROC_A FAILED at 2026-03-31, PROC_B completed that day. Re-run both; use
check_upstream=Truenext time. - Check and severity:
order, error. Kind of finding: problem. - Fix: re-run the upstream, then the process with
force_compute=True; usecheck_upstream=Truenext time.
completed_on_empty_upstream¶
- Detects: Process completed on an upstream that wrote 0 rows.
- Why it matters: The upstream wrote 0 rows (
COMPLETED,0 rows) and the downstream completed on an empty view: hollow values. - Example: PROC_A wrote 0 rows on 2026-03-31; PROC_B recorded COMPLETED. Re-run both if the empty date is unexpected.
- Check and severity:
order, warning. Kind of finding: problem. - Fix: re-run both with
force_compute=Trueif the empty date is unexpected.
ahead_of_upstream¶
- Detects: Process ahead of its upstream in business time.
- Why it matters: The process is at a later business date than its upstream: it reads inputs that do not exist yet.
- Example: PROC_B at 2026-04-30, PROC_A at 2026-03-31. Roll PROC_A out, then re-run PROC_B.
- Check and severity:
order, warning. Kind of finding: problem. - Fix: roll the upstream out to that date, then re-run the process with
force_compute=True.
date_computed_before_earlier_date¶
- Detects: Business date computed before an earlier date of the same process.
- Why it matters: A history is built forward: computing a later date first leaves the earlier dates empty or wrong.
- Example: 2026-03-31 computed while 2026-02-28 was not. Replay from the first date with
roll_out(..., time_id_start=1, force_compute=True). - Check and severity:
order, warning. Kind of finding: problem. - Fix:
roll_out(data_domain=..., time_id_start=1, force_compute=True), or the process form.
mixed_time_modes¶
- Detects: Dependency between real time and a TimeManager.
- Why it matters: A real-time process depending on a TimeManager process (or the reverse) has no common date.
- Example: PROC_A runs at the clock date, PROC_B in real time and reads it: its values carry another time.
- Check and severity:
order, warning, info. Kind of finding: problem. - Fix: drive both ends with one TimeManager.
different_time_drivers¶
- Detects: Dependency between two independent TimeManagers.
- Why it matters: Two independent TimeManagers on a dependency can drift apart.
- Example: PROC_A on TM_SALES, PROC_B on TM_RISK, B reads A. Unify the managers if they must stay aligned.
- Check and severity:
order, info. Kind of finding: improvement opportunity or observation. - Fix:
unify_time_managers([...], dry_run=True)if they must stay aligned.
domains_share_calendar¶
- Detects: Data domains whose clocks share a calendar.
- Why it matters: Two data domains on one calendar table move together: rolling one moves the other.
- Example: SALES and RISK clocks read the same table of dates. Roll them out to the same date.
- Check and severity:
order, info. Kind of finding: improvement opportunity or observation. - Fix: roll the domains out to the same date.
manager_shared_across_domains¶
- Detects: TimeManager read by several data domains.
- Why it matters: A TimeManager read by several domains cannot move for one without moving the others.
- Example: TM_MAIN is read by SALES and RISK processes. Give each domain its own soft clone.
- Check and severity:
order, warning. Kind of finding: problem. - Fix: give each domain its processes' own soft clone (
align_domain_time_managersorsplit_time_manager).
process_not_on_domain_clock¶
- Detects: Process of a data domain not on the domain clock.
- Why it matters: A process of a clocked domain on another manager misses the domain's roll_out.
- Example: PROC_C reads TM_OWN, domain SALES has a clock.
align_domain_time_managers(domain, process_ids=[pid], dry_run=True). - Check and severity:
order, warning. Kind of finding: problem. - Fix:
align_domain_time_managers(domain, process_ids=[pid], dry_run=True).
reference_process_left_out¶
- Detects: Reference process left out of the domain roll-out.
- Why it matters: A reference process excluded from the domain roll-out is not refreshed with it, by design (info).
- Example: PROC_REF has
domain_roll_out=False: confirm it is still intended. - Check and severity:
order, info. Kind of finding: improvement opportunity or observation. - Fix:
set_process_options(pid, domain_roll_out=True)to put it back.
rollout_no_single_calendar¶
- Detects: No single roll_out covers the data domain.
- Why it matters: One roll_out cannot drive the domain because its managers hold different dates.
- Example: TM_A has 12 monthly dates, TM_B has 52 weekly. Set a reference manager and align the others.
- Check and severity:
order, warning. Kind of finding: problem. - Fix:
set_domain_time_manager(<reference manager>, data_domain=...), thenalign_domain_time_managers(..., calendars=True).
rollout_refused¶
- Detects: roll_out of a data domain refuses: a manager on other dates.
- Why it matters:
roll_out(data_domain=...)refuses to start when a manager holds other dates: the domain cannot be refreshed in one call. - Example: TM_B lacks the dates of the clock; the roll_out raises before step 1. Align the calendars.
- Check and severity:
order, error. Kind of finding: problem. - Fix:
align_domain_time_managers(domain, calendars=True, dry_run=True).
processes_share_time_filtered_view¶
- Detects: Processes sharing the domain clock through a view.
- Why it matters: Processes reading the clock through one shared view cannot each get their own clone; moving one moves all.
- Example: PROC_A and PROC_B read
V_SHARED_FILTERED, which reads the clock. Clone the shared view's manager or move the filter into each view. - Check and severity:
order, warning. Kind of finding: problem. - Fix:
clone_shared_view_time_manager(view, dry_run=True), or move the filter into each process view.
Clock and calendar¶
Is the domain clock up to date, and does each calendar follow a rule?
clock_behind¶
- Detects: Domain clock behind its calendar rule.
- Why it matters: Dates due now are not in the clock: nothing computes them until it is refreshed.
- Example: A monthly clock holds up to 2026-02-28; March and April are due.
refresh_domain('SALES', until='now'). - Check and severity:
clock, warning. Kind of finding: problem. - Fix:
refresh_domain(domain, until='now').
calendar_gap¶
- Detects: Business dates skipped by a catch-up (recorded gap).
- Why it matters: A catch-up with
catch_up='latest'skipped dates and recorded them: their values were never computed. - Example: Jan to Mar skipped; the finding lists them. Roll them out if they matter.
- Check and severity:
clock, info. Kind of finding: improvement opportunity or observation. - Fix:
roll_out(data_domain=..., time_id_start=<first gap>, force_compute=True)once the dates are in the clock, if they matter.
calendar_rule_inferable¶
- Detects: TimeManager calendar: a rule can be stored.
- Why it matters: The dates follow a rule that is not stored: the clock cannot be extended or checked automatically (info).
- Example: Dates are the last day of each month. Store it with
tm.set_calendar(Calendar.monthly(day='last')). - Check and severity:
clock, info. Kind of finding: improvement opportunity or observation. - Fix:
tm.set_calendar(<the rule shown in the finding>).
calendar_irregular¶
- Detects: TimeManager calendar follows no rule.
- Why it matters: No rule fits the dates: extending the calendar stays manual (info).
- Example: Dates are ad hoc; keep
add_time_stepsor define a rule. - Check and severity:
clock, info. Kind of finding: improvement opportunity or observation. - Fix:
tm.set_calendar(Calendar....)with the rule, or keepadd_time_steps.
calendar_off_rule_dates¶
- Detects: TimeManager dates that do not fit the stored rule.
- Why it matters: Dates that do not fit the stored rule mean the rule or the dates are wrong.
- Example: Rule: monthly on the 1st; 2026-02-15 is in the table. Change the rule or the dates (
tm.change_calendar(..., dry_run=True)). - Check and severity:
clock, warning. Kind of finding: problem. - Fix:
tm.change_calendar(<rule>, dry_run=True), ortm.set_calendar(<the rule the dates follow>)if the dates are right.
registry_orphan¶
- Detects: TimeManager left in the registry, its table gone.
- Why it matters: The registry names a TimeManager whose table of dates is gone (info): a stale entry.
- Example:
TM_OLDis in the registry, its table dropped.unregister_viewremoves the row. - Check and severity:
clock, info. Kind of finding: improvement opportunity or observation. - Fix:
tdfs4ds.utils.manager_registry.unregister_view('<db>', '<view>'), named in the finding.
calendar_table_missing¶
- Detects: TimeManager table of dates missing.
- Why it matters: A process or clock reads a table of dates that no longer exists: it cannot run.
- Example: PROC_A reads
TM_X, whoseTM_X_HIDDENwas dropped. Recreate the table or reattach the processes. - Check and severity:
clock, error. Kind of finding: problem. - Fix: recreate the table of dates, or attach the processes that read it to another TimeManager.
Windows¶
Do the windows written in the process SQL match the calendar's step?
hand_written_window¶
- Detects: Window written by hand from the TimeManager.
- Why it matters: A window written by hand from the manager value breaks silently when the calendar step changes (info).
- Example:
d > ADD_MONTHS(BUSINESS_DATE, -1). Read<clock>_PREVIOUSinstead. - Check and severity:
windows, info. Kind of finding: improvement opportunity or observation. - Fix: read
<clock>_PREVIOUS:d > (SELECT BUSINESS_DATE FROM <clock>_PREVIOUS) AND d <= (SELECT BUSINESS_DATE FROM <clock>).
fixed_window_bound¶
- Detects: Window with a fixed literal lower bound.
- Why it matters: A fixed literal lower bound makes the window cumulative: fine if intended, a silent growth if not (info).
- Example:
d >= DATE '2020-01-01' AND d <= BUSINESS_DATE. Keep it for a cumulative read, else use_PREVIOUS. - Check and severity:
windows, info. Kind of finding: improvement opportunity or observation. - Fix: keep it if a cumulative read is meant, else read
<clock>_PREVIOUS(enable_previous()).
window_mismatch_calendar¶
- Detects: Window that does not match the calendar's step.
- Why it matters: The window length differs from the calendar step: periods overlap or leave gaps.
- Example: Weekly clock, window
ADD_MONTHS(..., -1): overlaps. Use the step, or declare it withwindow_length='31 days'. - Check and severity:
windows, warning. Kind of finding: problem. - Fix: read
<clock>_PREVIOUS(seehand_written_window), or change the window to the step of the calendar; a deliberate length is declared withwindow_length='31 days'(upload_features/set_process_options): equal to the SQL = info "declared", different from the SQL = warning.
Inputs in time (leakage)¶
Does a process read, at each business date, only what was known at that date?
point_in_time_leak¶
- Detects: TimeManager process reading a current dataset.
- Why it matters: A process on a TimeManager reading a current dataset sees values newer than its date: the leak that inflates a model.
- Example: PROC_SCORE at 2026-01-31 reads
DS_CUSTOMERbuilt current. Rebuild withbuild_dataset(..., time_manager=<its manager>). - Check and severity:
leakage, error. Kind of finding: problem. - Fix:
build_dataset(..., time_manager=<the process's manager>).
fixed_as_of_input¶
- Detects: TimeManager process reading a fixed-date dataset.
- Why it matters: The dataset is fixed at one date, so every date of the roll_out reads the same inputs.
- Example:
DS_CUSTOMERis built as of 2025-12-31; the roll_out covers 2026. Rebuild on the manager. - Check and severity:
leakage, warning. Kind of finding: problem. - Fix: rebuild the dataset with
time_manager=.
input_other_time_manager¶
- Detects: Process reading a dataset on another TimeManager.
- Why it matters: The dataset follows a different clock from the process: the two disagree on the date.
- Example: PROC_SCORE on TM_A reads a dataset on TM_B. Rebuild on TM_A or unify the managers.
- Check and severity:
leakage, warning. Kind of finding: problem. - Fix: rebuild the dataset on the process's manager, or unify the two managers.
Runs and segments¶
What the follow-up table says about the latest runs.
segments_missing¶
- Detects: FilterManager segments not computed at the latest date.
- Why it matters: Some FilterManager segments did not run at the latest date: part of the population is stale.
- Example: Region NORTH and EAST ran, SOUTH did not.
run(pid): only the missing segments run. - Check and severity:
segments, warning. Kind of finding: problem. - Fix:
run(pid): only the missing segments run.
segment_failed¶
- Detects: FilterManager segment failed at the latest date.
- Why it matters: One segment failed while the others completed: the failure hides in the aggregate.
- Example: Segment SOUTH FAILED at the latest date. Fix the cause, then
run(pid). - Check and severity:
segments, error. Kind of finding: problem. - Fix: fix the cause, then
run(pid).
hollow_run¶
- Detects: Run that wrote no rows.
- Why it matters: A run that wrote no rows succeeds without writing: values look refreshed and are not (
COMPLETED,0 rows). - Example: PROC_A wrote 0 rows on 2026-03-31. Check the source at that date; an empty source may be expected.
- Check and severity:
segments, info. Kind of finding: improvement opportunity or observation. - Fix: check the source at that date; an empty source may be expected.
stuck_running¶
- Detects: Run still marked RUNNING.
- Why it matters: A RUNNING row older than the longest completed run is probably a dead session: it can block reasoning about freshness.
- Example: RUNNING since 3 days, the longest completed run is 12 minutes.
run(pid, force_compute=True)once the cause is known. - Check and severity:
segments, warning. Kind of finding: problem. - Fix:
run(pid, force_compute=True)once the cause is known.
interrupted_run¶
- Detects: Run interrupted without recording an outcome.
- Why it matters: A run killed or lost leaves RUNNING with no outcome; the next run may skip or double it.
- Example: A dead run is found, no session carries it.
close_interrupted_runs(dry_run=True)lists and closes it (statusFAILED,interrupted: ...). - Check and severity:
segments, warning, info. Kind of finding: problem. - Fix:
close_interrupted_runs(dry_run=True); for a dead run,run(pid, force_compute=True)first.
Refresh by run() and roll_out()¶
Can run() and roll_out() still reproduce the data, or was the process used from outside the package?
external_segment_loop¶
- Detects: Same business date computed several times by one execution without a FilterManager.
- Why it matters: The same date computed several times by one execution without a FilterManager means a script loops around run(); a refresh will not reproduce it.
- Example: One execution wrote 5 runs at 2026-03-31 for PROC_A. Declare the segments in a FilterManager.
- Check and severity:
usage, warning. Kind of finding: problem. - Fix: declare the segments in a FilterManager (
upload_features(..., filtermanager=fm)).
external_time_loop¶
- Detects: Several business dates written by one execution without a TimeManager.
- Why it matters: Several dates written by one execution without a TimeManager: roll_out cannot replay the dates.
- Example: A script loops on dates calling
run(). Attach a TimeManager and replay withroll_out. - Check and severity:
usage, warning. Kind of finding: problem. - Fix: attach a TimeManager and replay with
roll_out(..., time_id_start=1, force_compute=True).
recursive_query¶
- Detects: Recursive query in the process SQL.
- Why it matters: A recursive query often generates dates inside the SQL: a loop hidden from the framework (information when the table is hierarchical).
- Example:
WITH RECURSIVE d(...)building months. Take the dates from a TimeManager orsys_calendar.calendar. - Check and severity:
usage, warning, info. Kind of finding: problem. - Fix: take the dates from a TimeManager,
sys_calendar.calendarorvalid_time_column=; no change if the table is hierarchical.
view_rewritten_between_runs¶
- Detects: Process view rewritten between runs (versions differ only by literals).
- Why it matters: Versions of the view differ only by literals: the view is edited for each date or value, so a refresh repeats only the last.
- Example: v1
WHERE region = 'NORTH', v2WHERE region = 'SOUTH'. Move the value to a FilterManager. - Check and severity:
usage, error. Kind of finding: problem. - Fix: move the value to a manager: FilterManager for categories, TimeManager for dates.
closed_without_flag¶
- Detects: Entities closed in storage while close_absent_entities is off.
- Why it matters: Entities closed in storage while
close_absent_entitiesis off: a custom step closes them and a refresh will not. - Example: 800 customers have a ValidEnd in the past. Set
close_absent_entities=Trueif they really leave, else find who closes them. - Check and severity:
closed_entities, warning. Kind of finding: problem. - Fix:
set_process_options(pid, close_absent_entities=True)if entities really leave; otherwise find what closes them.
validity_gap_without_flag¶
- Detects: Gaps in entities' validity history while close_absent_entities is off.
- Why it matters: A run leaves no gap in validity; a gap shows a step outside the run.
- Example: CUSTOMER 123 has no value between Feb and Mar. Remove the custom step; use
close_absent_entities. - Check and severity:
closed_entities, warning. Kind of finding: problem. - Fix: remove the custom step;
close_absent_entities=Trueif entities really leave, then replay.
writes_outside_run¶
- Detects: Feature tables written outside a run (query log).
- Why it matters: The query log shows writes to feature tables that are not a run (information: removals and relocations also look so).
- Example: A
DELETEonFS_T_...from a script. Useclose_absent_entities,remove_featureorrelocate_features. - Check and severity:
closed_entities, info. Kind of finding: improvement opportunity or observation. - Fix: stop writing to the feature tables directly:
close_absent_entities,remove_feature,relocate_features.
Process SQL¶
Does the SQL that runs match the SQL that was recorded?
sql_drift¶
- Detects: Live SQL different from the stored version.
- Why it matters: The view changed since the last run, so the stored version no longer describes what runs.
- Example:
V_PROC_Awas edited by REPLACE VIEW; no run since.capture_process_sql([pid], dry_run=False)or run it. - Check and severity:
sql, warning. Kind of finding: problem. - Fix:
capture_process_sql([pid], dry_run=False), or run the process.
history_mixes_versions¶
- Detects: History computed under several SQL versions.
- Why it matters: A history computed under several SQL versions is not homogeneous (info): comparing periods mixes two definitions.
- Example: Jan to Mar by v1, Apr on by v2. Replay from the first date if the history must be consistent.
- Check and severity:
sql, info. Kind of finding: improvement opportunity or observation. - Fix: if the history must be consistent,
roll_out(..., time_id_start=1, force_compute=True).
Storage layout¶
Skew, primary index, partitioning and statistics, against the entity and the largest source.
storage_skew¶
- Detects: Storage table skewed across AMPs.
- Why it matters: A skewed table loads one AMP: slow queries and wasted space.
- Example:
FS_T_...has a primary index on REGION (4 values): most rows in 4 AMPs. Choose anotherprimary_index=. - Check and severity:
skew, warning. Kind of finding: problem. - Fix: check the entity columns of the primary index (a low-cardinality column concentrates rows); entity scan, then another
primary_index=.
entity_pi_inconsistent¶
- Detects: Storage tables of one entity with different primary indexes.
- Why it matters: Processes of one entity with different primary indexes cannot be joined AMP-locally.
- Example: PROC_A indexes on CUSTOMER_ID, PROC_B on (CUSTOMER_ID, DAY). Use one
primary_index=for the entity. - Check and severity:
distribution, warning. Kind of finding: problem. - Fix: one
primary_index=for every process of the entity (plan_relocation(primary_index=)).
pi_not_aligned_with_source¶
- Detects: Primary index not aligned with the largest source.
- Why it matters: A primary index unlike the largest source makes the staging step redistribute rows (info; warning when EXPLAIN measures it).
- Example: Source indexed on CUSTOMER_ID, storage on ACCOUNT_ID: a redistribution in the plan.
- Check and severity:
distribution, warning when EXPLAIN measures a redistribution, else info. Kind of finding: problem. - Fix: the same primary index for the whole entity (re-register, replay).
partition_not_aligned_with_source¶
- Detects: Partitioning not aligned with the largest source.
- Why it matters: Partitioning unlike the largest source loses elimination (info).
- Example: Source partitioned by day, storage by nothing. Partition on the entity column.
- Check and severity:
distribution, info. Kind of finding: improvement opportunity or observation. - Fix:
partitioning=on the entity column.
fs_partition_not_on_filter¶
- Detects: Storage tables not partitioned on the segmentation columns.
- Why it matters: Storage tables not partitioned on the segmentation columns: each segment scans the whole table (info).
- Example: FilterManager on REGION, storage not partitioned on REGION.
partitioning=on it. - Check and severity:
distribution, info. Kind of finding: improvement opportunity or observation. - Fix:
partitioning=on the segmentation entity column.
source_without_statistics¶
- Detects: Large source table with no statistics.
- Why it matters: A large source with no statistics makes the optimizer guess its joins and spool (info; its owner defines them).
- Example:
SRC.EVENTS(8,000 MB) has no statistics. Its owner runs the COLLECT STATISTICS the finding gives. - Check and severity:
distribution, info. Kind of finding: improvement opportunity or observation. - Fix: the owner of the source runs the COLLECT STATISTICS statement the finding gives; tdfs4ds does not collect statistics on a table it does not own.
largest_source_unknown¶
- Detects: Largest source unknown (some sources not readable): no alignment advice.
- Why it matters: Some sources are not readable by this user, so the alignment of primary index and partitioning was not compared (info).
- Example: Sources read through views. Nothing to fix, or assess with a user that can read the base table sizes.
- Check and severity:
distribution, info. Kind of finding: not verified or limited view. - Fix: nothing when the sources are read through views; otherwise assess with a user that can read
DBC.TableSizeVfor the base tables.
Partition pruning¶
Is the TimeManager or FilterManager value read in a way that lets the database skip partitions?
partitioned_source_read_whole¶
- Detects: Partitioned source read whole by the plan.
- Why it matters: A partitioned source read in full by the plan makes every run read all of history.
- Example: A 365-day table read in 365 partitions. Filter on the partitioning column with a scalar subquery.
- Check and severity:
distribution, warning with a manager, info without. Kind of finding: problem. - Fix: filter the source on its partitioning column with a scalar subquery.
segments_rescan_source¶
- Detects: FilterManager segments each reading the whole source.
- Why it matters: Every segment reads the whole source again: N segments cost N full scans.
- Example: 5 regions, source not partitioned by region. Segment on the source's partitioning columns.
- Check and severity:
distribution, warning. Kind of finding: problem. - Fix: segment on the source's partitioning columns, if a segment holds every row its computation needs.
time_filter_by_join¶
- Detects: TimeManager read through a join instead of a scalar filter.
- Why it matters: The TimeManager joined instead of read as a scalar blocks partition pruning (a view scored on the ACC needs the join, Error 6881 otherwise).
- Example:
JOIN tm ON d = tm.BUSINESS_DATE. UseWHERE d = (SELECT BUSINESS_DATE FROM tm). - Check and severity:
distribution, warning. Kind of finding: problem. - Fix: scalar filter on the source's date column (a view scored on the ACC needs the join: Error 6881 otherwise).
time_filter_not_scalar¶
- Detects: TimeManager read in another form than a scalar filter.
- Why it matters: The manager read in another form than a scalar filter may read all rows.
- Example: Manager value read through a CTE; read it as a scalar in the view using it.
- Check and severity:
distribution, warning. Kind of finding: problem. - Fix: scalar filter in the view that uses the value.
time_filter_not_on_partitioning¶
- Detects: Business date compared with a column the source is not partitioned on.
- Why it matters: The business date compared with a column the source is not partitioned on prunes nothing (info).
- Example: Table partitioned on EVENT_TS, filter on LOAD_DATE. Compare the partitioning column itself.
- Check and severity:
distribution, info. Kind of finding: improvement opportunity or observation. - Fix: compare the business date with the partitioning column itself.
time_filter_defeats_pruning¶
- Detects: Business-date filter on the partitioning column that the SQL keeps from pruning.
- Why it matters: Arithmetic on the partitioning column (a function, a cast) keeps the database from pruning partitions; measured: a bare scalar prunes, a wrapped column reads all.
- Example:
CAST(EVENT_TS AS DATE) = (SELECT ...): keep EVENT_TS bare, cast the scalar to the column's type. - Check and severity:
distribution, warning. Kind of finding: problem. - Fix: keep the column bare, put arithmetic on the business date side; cast the scalar to the column's type.
segment_filter_by_join¶
- Detects: FilterManager read through a join instead of a scalar filter.
- Why it matters: A FilterManager joined instead of read as a scalar blocks pruning.
- Example:
JOIN fm ON region = fm.REGION. Use a scalar filter on the segment column. - Check and severity:
distribution, warning. Kind of finding: problem. - Fix: scalar filter on the source's segment column.
segment_filter_not_scalar¶
- Detects: FilterManager read in another form than a scalar filter.
- Why it matters: The segment value read in another form than a scalar may read all rows.
- Example: Scalar subquery wrapped in a CTE. Read it in the view that uses it.
- Check and severity:
distribution, warning. Kind of finding: problem. - Fix: scalar filter in the view that uses the value.
segment_filter_defeats_pruning¶
- Detects: Segment filter on the partitioning column that the SQL keeps from pruning.
- Why it matters: The segment filter is on the partitioning column but the SQL keeps the plan from pruning.
- Example:
UPPER(REGION) = (SELECT ...). Scalar subquery on the bare column. - Check and severity:
distribution, warning. Kind of finding: problem. - Fix: scalar subquery on the bare partitioning column.
segment_filter_off_hierarchy¶
- Detects: FilterManager skipping a higher level of the source's partitioning.
- Why it matters: The source is partitioned on several levels and the segment skips a higher one: more partitions than needed (measured: region alone 366 partitions, both levels 1).
- Example: Partitioned by day then region, segments on region. Add the day level.
- Check and severity:
distribution, warning. Kind of finding: problem. - Fix: add the skipped level to the FilterManager columns, or filter it with the TimeManager in the same view.
Database space¶
dbc_nearly_full¶
- Detects: Database DBC nearly full.
- Why it matters: A full DBC (Error 2644) blocks every DDL: connect() and registration fail.
- Example: The fullest AMP of DBC is above 90%. An administrator purges the query log tables or adds space.
- Check and severity:
dbc_space, warning. Kind of finding: problem. - Fix: an administrator purges the query log tables (DBC.DBQLogTbl, ...) or gives DBC more space.
Metadata time, documentation and glossary¶
Is what describes the store valid now, and how much can the generated documentation be trusted?
metadata_valid_in_future¶
- Detects: Catalog rows valid from a future time.
- Why it matters: Catalog rows valid from the future are invisible until then, so a feature looks unregistered and a run registers it again.
- Example: A forecast roll_out registered FEATURE_X at 2027-01-31 before 0.3.7.34. Start those rows now.
- Check and severity:
metadata_time, warning. Kind of finding: problem. - Fix: inspect them (
NONSEQUENCED VALIDTIME SELECT * FROM <table> WHERE ValidStart > CURRENT_TIMESTAMP); for a key with no other row, start them now.
glossary_valid_in_future¶
- Detects: Glossary term valid from a future time.
- Why it matters: A glossary term valid from a future time is not read yet: the agent ignores it.
- Example: Term CHURN starts 2027-01-01. Inspect the term.
- Check and severity:
glossary, warning. Kind of finding: problem. - Fix: inspect the term; terms written with 0.3.7.34 or later start when written.
documentation_valid_in_future¶
- Detects: Documentation valid from a future time.
- Why it matters: Documentation valid from the future is invisible: the object looks undocumented.
- Example: Descriptions of
DS_CUSTOMERstart at a future date; inspect the parts. - Check and severity:
documentation_valid_time, warning. Kind of finding: problem. - Fix: inspect the parts; documentation written with 0.3.7.34 or later starts when written.
documentation_low_confidence¶
- Detects: Generated documentation written without documented sources.
- Why it matters: Text generated while the inputs were not documented rests on guesses.
- Example:
V_PROC_Adocumented whenSRC.ORDERShad no description. Document the source, then regenerate withrebuild_documentation(objects=[...], force_update=True). - Check and severity:
documentation_confidence, warning. Kind of finding: problem. - Fix: document the sources (
tdfs4ds.set_object_documentation(...), or load a data dictionary withupload_business_dictionary_objects/_columns), then regenerate the object:tdfs4ds.rebuild_documentation(objects=[...], force_update=True).
documentation_can_be_improved¶
- Detects: Generated documentation that a better-documented input can improve.
- Why it matters: An input is better documented now than when the text was generated (info): a regeneration would improve it.
- Example:
SRC.ORDERSwas documented afterV_PROC_A. Regenerate the object. - Check and severity:
documentation_confidence, info. Kind of finding: improvement opportunity or observation. - Fix: the same
rebuild_documentation(objects=[...], force_update=True)call, named in the finding.
generated_contradicts_human¶
- Detects: Generated documentation that contradicts human text.
- Why it matters: Generated text that contradicts a person's: the person's was kept; one of the two is wrong (warning against the object's own text, info against upstream).
- Example: Human: 'amount in EUR'. Generated: 'amount in USD'. Review and correct the wrong one.
- Check and severity:
documentation_confidence, warning (own text), info (upstream text). Kind of finding: problem. - Fix: review the generated text (
set_object_documentation(...)), or correct the human text, thenrebuild_documentation(objects=[...], force_update=True).
documentation_confidence_not_recorded¶
- Detects: Generated documentation whose confidence was not recorded.
- Why it matters: Descriptions written before confidence was recorded have an unknown level, not a high one (info).
- Example: 12 descriptions.
assess_documentation_confidence()previews a level,dry_run=Falsestores it. - Check and severity:
documentation_confidence, info. Kind of finding: improvement opportunity or observation. - Fix:
tdfs4ds.assess_documentation_confidence()previews a level computed from the current documentation of the inputs,dry_run=Falsestores it (labelled assessed after the fact).
Feature values and sensitivity¶
Declared properties against stored values.
feature_values_out_of_range¶
- Detects: Feature values outside their declared range or allowed values.
- Why it matters: Values outside the declared range or allowed values: the source or the declaration is wrong. tdfs4ds never filters a value; it only reports.
- Example: FEATURE_X declared 0..100, 3% of rows above. Look at the source or correct the declaration.
- Check and severity:
feature_properties, warning. Kind of finding: problem. - Fix: look at the source, or correct the declared range (
feature_properties(features=[...])).
sensitive_feature_in_dataset¶
- Detects: Dataset exposing a feature declared sensitive.
- Why it matters: A dataset exposing a feature declared sensitive spreads it to every reader of the dataset.
- Example: FEATURE_X is declared sensitive (reason: personal data);
DS_MARKETINGexposes it. Check the use against the reason. - Check and severity:
feature_properties, warning (dataset), info. Kind of finding: problem. - Fix: check the dataset's use against the declared reason.
Server-side batch¶
Only when SERVER_SIDE_BATCH is used.
server_batch_object_missing¶
- Detects: Server-side batch procedure not installed while the setting is on.
- Why it matters: SERVER_SIDE_BATCH is on but the procedure is not installed: every batch silently falls back to the client path.
- Example: Setting 'auto', no
TDFS4DS_RUN_BATCH_1.install_server_side_batch(dry_run=False)after a dry run. - Check and severity:
server_batch, warning. Kind of finding: problem. - Fix:
install_server_side_batch(dry_run=True), review, thendry_run=False.
server_batch_body_drift¶
- Detects: Server-side batch procedure whose text differs from this version's.
- Why it matters: The registered text is not the text this version installs: a procedure of another version.
- Example: Installed by an older tdfs4ds. Install again to replace it.
- Check and severity:
server_batch, warning. Kind of finding: problem. - Fix:
install_server_side_batch(dry_run=False)replaces it.
server_batch_stale¶
- Detects: Server-side batch object registered but not installed.
- Why it matters: The registry names an object that is not in the database (info).
- Example: Procedure dropped by hand. Install again or delete the registry row.
- Check and severity:
server_batch, info. Kind of finding: improvement opportunity or observation. - Fix:
install_server_side_batch(dry_run=False), or drop its registry row.
server_batch_orphan¶
- Detects: Server-side batch object installed but not registered.
- Why it matters: An object exists in the database but not in the registry (info).
- Example: A procedure installed before the registry. Install again to register it, or drop it.
- Check and severity:
server_batch, info. Kind of finding: improvement opportunity or observation. - Fix: install again to register it, or DROP it if no longer wanted.
Reading a report¶
The HTML report opens with the verdict: how many processes have an error, a warning, information only or nothing, then a grid with one row per process in execution order and one column per dimension (Lineage, Entity keys, Order and time, Inputs in time, Runs, Process SQL, Refresh, Storage and pruning). A cell shows the worst severity found, ok when the dimension was checked and found nothing, n/a when its check did not run. Below, each finding is a collapsible block.
A finding as it appears, here time_filter_defeats_pruning:
- Area / kind: storage,
time_filter_defeats_pruning, warning. - Object: the process view (PROC_A) and the source table.
- Detail: the business-date filter is on the partitioning column but the SQL wraps the column, so the plan reads every partition.
- Fix: keep the column bare, put the arithmetic on the business-date side, cast the scalar to the column's type.
- Processes: the process ids it concerns, used to place it in the grid.
Each process also gets a refresh verdict: refreshable, at risk (a warning), not refreshable (an error: a refresh only repeats the last state) or not checked. In the CSV export each finding is a row: area, severity, kind, label, object, detail, fix, processes.
What it cannot see¶
- A failed or refused read is not a pass. It goes to Not verified with its reason.
- Lineage-based checks need the persisted lineage graph (
order,leakage,integrity,network): when it is empty they are not verified untilrebuild_lineage_graph(all_data_domains=True)runs. - The storage checks run only in the full scope (
entity_scan,dataset_rows,feature_properties) or on demand;closed_entitiesis EXPLAIN-gated and reports not verified above 60 seconds or 10 GB of spool. - A loop that calls
roll_outone date at a time looks like aroll_out; only what its step did to storage shows. A loop whose runs fall in separate executions looks like a schedule. - Findings that depend on EXPLAIN (pruning, redistribution) depend on the plan the database chose at that moment.
- Access rights. Without the right to read a view, a table size or the query log, the related finding is limited or not verified.
- Business meaning. The checks see structure, not intent: a cumulative window or a reference process left out may be deliberate.
Reading a finding: a lead to investigate, not a verdict¶
Findings support the people who look after the store; they do not replace them. A finding can be a false positive, because the checks work from names, counts, plans and recorded SQL and cannot know what was intended. A finding that is correct but expected can be accepted with a justification (accept_finding), and it comes back when its details change. An absent finding is not proof that all is well: the list is not exhaustive and some checks only run in the full scope. Investigate each finding, confirm it with the owner of the process, then decide.
See also¶
- Sanity checks: the call, scopes, report and the compact table of all kinds.
- Assess workflow health: triage order, refresh verdicts, accepting a finding.
- Skills: fs-sanity-check, fs-workflow-assessment.