Inspect & monitor¶
Five built-in catalogs — all scoped to the active DATA_DOMAIN — give you
full visibility into what is registered, what ran, and where it lives.
Catalogs¶
tdfs4ds.process_catalog() # PROCESS_ID, VIEW_NAME, ENTITY_NAME, FEATURES, METADATA, ...
tdfs4ds.feature_catalog() # FEATURE_NAME, ENTITY_NAME, FEATURE_TABLE, PROCESS_ID, ...
tdfs4ds.dataset_catalog() # VIEW_NAME, ENTITY_NAME, COMMENT, ...
tdfs4ds.get_dataset_entity()
tdfs4ds.get_dataset_features()
Each returns a teradataml DataFrame — chain .to_pandas() for local
manipulation.
To get the rows into pandas directly, pass as_pandas=True to process_catalog,
feature_catalog or dataset_catalog (0.3.7.20). The catalog is then read with one statement.
Building a teradataml DataFrame first costs seven metadata statements on the data dictionary
(HELP COLUMN, DBC.IndicesV, DBC.All_RI_ChildrenV, ...) before a row is read. On a system
with a large dictionary that takes minutes.
To get each feature together with its producing process, its documentation and the process SQL (as XLSX, HTML or a DataFrame, for some domains, at a past date), see Export the feature catalog.
Find a process by view name¶
from tdfs4ds.process_store.process_query_administration import get_process_id
# Fully qualified name
process_id = get_process_id('"my_db"."FEAT_ENG_CUSTOMER"')
# Or just the view name (defaults to tdfs4ds.SCHEMA)
process_id = get_process_id(view_name='FEAT_ENG_CUSTOMER')
Follow-up — every run, every status¶
follow_up = (
tdfs4ds.process_store.process_followup.follow_up_report()
.sort('START_DATETIME', ascending=False)
)
Business dates¶
FS_FOLLOW_UP is an event log, not a temporal table. Each row has the time the
run started (START_DATETIME) and the business date it computed
(VALIDTIME_DATE; NULL for a real-time run). followup_business_dates() reads
it per process and segment:
from tdfs4ds.process_store.process_followup import followup_business_dates
fu = tdfs4ds.process_store.process_followup.follow_up_report().to_pandas().reset_index()
followup_business_dates(fu) # {pid: {last_business_date, last_run_at, last_failure_at, ...}}
followup_business_dates(fu, as_of='2026-10-01') # only the runs started by then
Status values¶
| Status | Meaning |
|---|---|
COMPLETED |
Process ran successfully |
RUNNING |
Currently executing — or crashed before writing FAILED |
FAILED,… |
Exception raised; the suffix carries the error message |
A stale RUNNING row means the process was interrupted before its status
could be written (a killed kernel, a lost session). The feature data for that
execution is incomplete; re-run the process before relying on those values.
A failure that Python sees is recorded as FAILED,… (since 0.3.1.210).
Resources used by each execution (DBQL)¶
The query band, the DBQL join (followup_resource_usage), the stored history
(FS_EXECUTION_RESOURCES) and the app's Runs page moved to
Operate in production.
Re-execute and remove¶
# Re-run at the current FEATURE_STORE_TIME
tdfs4ds.run(process_id=process_id)
# Remove a process from the catalog. Feature DATA is preserved.
tdfs4ds.process_store.process_query_administration.remove_process(process_id)
remove_process is metadata-only: the underlying temporal feature tables
keep every row they ever had.
What depends on it: removals are refused, then planned (since 0.3.3.27)¶
A dataset reads the values of one process (FEATURE_VERSION = <PROCESS_ID>
in its view), and a process view can read a dataset or another process's view.
Removing a process those objects read used to succeed silently. The dataset kept
returning the values the removed process last wrote and was never refreshed,
and the next lineage rebuild dropped the link.
So remove_process, remove_feature and remove_dataset(..., dry_run=False)
first look at what depends on the object. When something does, they refuse
and raise tdfs4ds.DependentObjectsError. Its message lists the dependents in
the order they must be removed: the objects that read others come first.
Cannot remove process 3b3e...: 2 object(s) depend on it. In the order they must be removed:
1. process DB_LAB.FEAT_WA_CUST_TICKET (9f1c...) - its view reads DB_LAB.DS_WA_CUST_MONTHLY
2. dataset DB_LAB.DS_WA_CUST_MONTHLY - reads sum_amount, count_amount computed by DB_LAB.FEAT_WA_CUST_MONTHLY (3b3e...)
The removal is refused too when what depends on the object cannot be read: a
dataset view that cannot be read, or an empty lineage graph. force=True removes
the object alone, as before 0.3.3.27, and leaves the dependents broken.
How dependents are found:
| Removed object | What breaks | Read from |
|---|---|---|
| process | datasets reading its values (not another process's version of the same feature), process views reading its view, and everything downstream of those | dataset view DDL, persisted lineage |
| feature | datasets reading it, and downstream; nothing when process_id= scopes the removal and another process still computes it |
dataset feature list, lineage |
| dataset | process views reading it, and downstream | persisted lineage |
Removing an object with its dependents. plan_removal lists the steps in
order. write_removal_script turns them into a Python script that only removes
when run with --apply:
plan = tdfs4ds.plan_removal(['<process id>'], # also view names, datasets,
purge_values=False, # or features as (name, [entity], domain[, process_id])
drop_views=False)
for s in plan['steps']:
print(s['action'], s['object'], '<-', s['reason'])
path = tdfs4ds.write_removal_script(plan) # under tdfs4ds.SCHEDULING_SCRIPT_DIR
python tdfs4ds_removal_20261022_153000.py # dry run: what each step would remove
python tdfs4ds_removal_20261022_153000.py --apply # removes, in order; stops at the first failure
Checked afterwards. When every step has run, the script checks that nothing
is left behind and exits with code 2 if something is. It looks for:
- catalog rows;
- business dictionary rows (description, sections, columns), process
documentation and provenance;
- stored SQL versions;
- vector-index entries. With Chroma they are counted by id. With the Teradata
Vector Store, entries cannot be counted (embeddings are keyed by row position),
so the check is that every collection is ready after its refresh.
The dry run shows the same counts before anything is removed.
tdfs4ds.dependencies.verify_removal(plan) runs the check on its own; in the app,
use Check what is left.
The steps of the plan:
- Order: processes that read others go first, then their datasets, then the
requested object.
- Features: each removed process is followed by remove_feature(...,
process_id=pid) for its features. That call removes a feature's catalog entry
only when no remaining process computes it.
- Stored values: purge_values=True adds the deletion of the removed
versions' rows from FS_T_*. It is irreversible; by default the history stays.
The admin app has the same flow under Govern → Remove objects. You choose processes, datasets and features; the page shows the ordered plan, runs a dry run (counts only) and downloads the script. After you have run the script, Check what is left counts what each step left behind. The page itself never removes anything.
The removal log. Every removal, and every refusal, is one row of the
optional table FS_REMOVAL_LOG (view FS_V_REMOVAL_LOG, created at setup() /
connect()). A row holds:
- what was removed: the object's id and its name (a process's view, so it can
still be named once its catalog rows are gone);
- who removed it (database USER) and when;
- whether it was forced, and the dependents;
- the origin: api, script or app;
- the outcome: REFUSED, COMPLETED or FAILED,<error>.
Remove a process together with its features¶
remove_process never touches the feature catalog. To remove the features a
process computes as well, pass the process to remove_feature (0.3.3.23):
from tdfs4ds.lineage.lineage_store import get_descendants
from tdfs4ds.utils.identifiers import split_qualified
pid = '<process id>'
info = tdfs4ds.get_process_info(pid)
# 1. Impact first: everything that reads the process view, directly or not
print(get_descendants(*split_qualified(info['VIEW_NAME']))) # datasets, processes, views
# 2. Its features: remove_feature decides, per feature, whether the catalog entry goes
entity = [e.strip().split(' ')[0] for e in info['ENTITY_COLUMNS']]
for name in info['FEATURE_COLUMNS']:
tdfs4ds.remove_feature(name.strip(), entity_id=entity,
data_domain=info['DATA_DOMAIN'], process_id=pid)
# 3. The process itself (drop_view=True only when nothing reads the view)
tdfs4ds.process_store.process_query_administration.remove_process(pid)
When datasets or other processes read them, these calls are refused (see
above). tdfs4ds.plan_removal([pid]) writes the whole sequence, dependents
included, in order.
A feature is the triplet (data domain, entity, name) and has one catalog
entry for all the processes computing it. With process_id=:
| The feature is computed by | remove_feature(..., process_id=pid) |
|---|---|
pid only |
removes the feature entirely (catalog entry, documentation, index entries) |
pid and other processes |
keeps the catalog entry; removes only pid's documentation of the feature (on pid's view) |
The call returns {"mode": "full" | "process", "others": [...], "listed": bool}.
If the producing processes cannot be read, nothing is removed and None is
returned. Without process_id, remove_feature removes the feature whatever
process computes it, as before. Stored values are never deleted: they stay in
their FS_T_* table, and the consistency report's storage scan lists the
values of a removed feature as orphans.
Discover available features¶
from tdfs4ds.feature_store.feature_query_retrieval import (
get_list_entity,
get_list_features,
get_available_features,
get_feature_versions,
)
get_list_entity() # entities in the active DATA_DOMAIN
get_list_features(entity_name='CUSTOMER_ID')
get_available_features(entity_id=['CUSTOMER_ID'])
Entity refresh: when was each entity last confirmed?¶
The ingestion MERGE writes nothing when a value is unchanged, so the ValidStart of a feature
row is the time of the last change, not of the last confirmation; and FS_FOLLOW_UP is per run
and segment, so an entity the source stopped returning looks as fresh as one the run recomputed.
Register the process with track_entity_refresh=True (or set_process_options(pid,
track_entity_refresh=True)) and each batch also records, in an admin table, that it confirmed each
of its entities:
tdfs4ds.entity_refresh('<PROCESS_ID>') # last confirmation of each entity
tdfs4ds.entity_refresh('<PROCESS_ID>', entities=[1, 2], history=True) # every period of some entities
tdfs4ds.entity_refresh('<PROCESS_ID>', as_of='2024-01-15') # the table as of a valid time (UTC)
s = tdfs4ds.entity_refresh_summary('<PROCESS_ID>')
s['by_refresh_time'] # entities per last refresh time
s['not_confirmed'] # a sample of the entities the latest run did not confirm (s['n_not_confirmed'] = how many)
s['state'], s['message'] # 'tracked' / 'not_tracked' / 'never_run' / 'no_table'
- Where: one table
FS_R_*per (data domain, entity key, primary index, placement tag), named by the rule of theFS_T_*tables plus the placement tag of the process (see Relocating features): processes in tables of their own never share a refresh table. Columns: the entity,PROCESS_ID,REFRESH_TIME(the run's valid time),LOAD_TIME(database clock),RUN_ID, and a valid-time period: each run opens a new period per entity it produced. It is not a feature: no catalog orFS_V_*view exposes it, no dataset reads it. The Store map lists it as Entity refresh (admin). Created by the first tracked write. - Valid time: as the values:
VALIDTIME PERIOD '(t, UNTIL_CHANGED)'with the run's valid time,CURRENT VALIDTIMEwithout one. A re-run at an earlier date rewrites the later periods, like the values MERGE: replay a history from its first date. - Fail-open: a failed write is a warning with the full database message; the run stays
COMPLETEDand the history has a gap. A batch that staged 0 rows records nothing. An entity ended byclose_absent_entitieskeeps its last refresh row. With a FilterManager, a run confirms only its segment: the other segments show as not confirmed until their turn. - Older clients record nothing. The summary compares with
FS_FOLLOW_UP: COMPLETED runs without a refresh row readnot tracked (older client or failed write), never "every entity was dropped". - Removal and migration:
remove_processdeletes the refresh rows of the process (and itsFS_PROCESS_SETTINGSrow);dependencies.footprintcounts them. Migration copies the setting, not theFS_R_*tables (a recompute regenerates them). The parallel planner serialises two tracked processes that share a refresh table.
Storage statistics¶
Each feature storage table (FS_T_*) needs optimizer statistics. Without them
Teradata can misestimate dataset queries by orders of magnitude. Ingestion
defines them the first time it writes to a table. After each merge it only
refreshes the statistics the table already has (`COLLECT STATS ON