Skip to content

Feature properties

Some facts about a feature are true for any use of its data: the range a value must fall in (or the values a category may take), what a NULL means and whether one is expected, and whether the feature is sensitive. Declare them once, in the store, and every surface shows them.

Properties are declared, shown and checked on demand. They never change a value and never stop a run:

  • run() and roll_out() do not read them. A store with properties issues exactly the statements it issued without them.
  • Nothing is filtered, filled or clipped. If NULL means zero for your use, write the COALESCE in the process view, where lineage and documentation can see it.
  • Nothing is created in the database until the first declaration.

Declare

One row per feature, from a table, a view, SQL text or a teradataml DataFrame. Only the columns you give declare something; an empty cell declares nothing for that property.

Column Meaning
FEATURE_NAME required
ENTITY_NAME, DATA_DOMAIN narrow a name registered under several entities or domains (domain defaults to data_domain= / tdfs4ds.DATA_DOMAIN)
PROCESS a process id or process view: the declaration holds for that process only
VALID_MIN, VALID_MAX bounds, as literals of the feature's stored type
ALLOWED_VALUES allowed values of a category: a JSON array, or | / , separated
NULLABLE Y / N (N = a NULL is not expected)
NULL_MEANING zero, not_applicable or unknown
SENSITIVE, SENSITIVITY_REASON Y / N, and why
plan = tdfs4ds.upload_feature_properties("MY_DB.FEATURE_RULES", dry_run=True)   # what would be written
tdfs4ds.upload_feature_properties("MY_DB.FEATURE_RULES", author="data owner")

Features are matched in the catalog; unknown names, ambiguous names and invalid values (a bound that is not a literal of the feature's type, an unknown NULL_MEANING) are reported and not written. A new declaration replaces the feature's previous one; the previous one stays readable at a past valid time.

Read

tdfs4ds.feature_properties(data_domains=["MY_DOMAIN"])                 # as declared now
tdfs4ds.feature_properties(features=["AGE"], as_of="2026-06-30")        # as declared then
tdfs4ds.render_properties_text(row)    # "Valid range: 0 to 120. Sensitive: ... Do not use it to select customers."

The Feature catalog page of the app shows them (a Properties column, filters has a valid range and sensitive, the full text in the side panel), the HTML / XLSX export carries VALID_RANGE, NULL_MEANING and SENSITIVE, generated documentation and the Chroma index include the text, and the chat agent answers "what is a valid value for X?" and ends a feature's definition with its properties.

Check, on demand

tdfs4ds.check_feature_properties(data_domains=["MY_DOMAIN"])                # values valid now
tdfs4ds.check_feature_properties(data_domains=["MY_DOMAIN"], history=True)  # whole history, with the first violation

One aggregate per storage table counts, per feature, the stored values outside the range, not allowed, or NULL where none is expected. Only the values of the processes that currently produce the feature are counted (values of a removed process are kept in storage but no dataset reads them). history=True reads the whole valid-time history and can be expensive on large tables.

The same check runs in the sanity check when you ask for the full scope:

tdfs4ds.sanity_check("report.html", scope="full", data_domains=["MY_DOMAIN"], quality_threshold=0.01)

It warns when a feature's share of values breaking its properties is above quality_threshold (1 %), with the date of the first one, and when a dataset (or a process reading one) carries a feature declared sensitive. The cheap scope does not run it.

Opt-in uses elsewhere:

  • tdfs4ds.feature_extremes("AGE", declared=True) adds the declared range and the share of values outside it.
  • tdfs4ds.plot_feature("AGE", bounds=True) draws the declared bounds.
  • The chat agent uses the bounds only when you ask about outliers or for a chart.
  • tdfs4ds.sensitive_reach(graph, props) lists the datasets, processes and features downstream of a sensitive feature.

Removal and migration

Removing a feature ends its property rows. migrate_objects carries the declarations of the migrated processes' features into the target store.