tdfs4ds.feature_props.read¶
tdfs4ds.feature_props.read
¶
Reading declared feature properties (primary store, optionally federated).
COLUMNS
module-attribute
¶
COLUMNS = ['DATA_DOMAIN', 'ENTITY_NAME', 'FEATURE_NAME', 'PROCESS_ID', 'VALID_MIN', 'VALID_MAX', 'ALLOWED_VALUES', 'NULLABLE', 'NULL_MEANING', 'SENSITIVE', 'SENSITIVITY_REASON', 'AUTHOR', 'DB_USER', 'VALID_FROM']
run_frame
¶
Run one SELECT through teradataml.execute_sql and return a frame (no DataFrame metadata).
assemble
¶
The public frame from the two raw reads (pure): ALLOWED_VALUES becomes a list (or None), NULLABLE / SENSITIVE booleans (or None). Sorted by domain, entity, feature, process.
properties_for_process
¶
The rows of props_df that apply to one process (pure).
process_row: a mapping with PROCESS_ID and, optionally, DATA_DOMAIN / ENTITY_NAME /
FEATURE_NAMES (comma list). A row with no PROCESS_ID applies to every producing process; a row
for another process is dropped; for one feature, a row of this process wins over the general one.
_federated
¶
(props, allowed) frames across the attached stores that have the objects, or None when
only the primary applies (single-store SQL stays as is).
feature_properties
¶
feature_properties(features: Optional[Iterable[str]] = None, data_domains: Optional[Iterable[str]] = None, as_of=None) -> pd.DataFrame
The declared properties of features, one row per (feature, process) rule.
Columns: DATA_DOMAIN, ENTITY_NAME, FEATURE_NAME, PROCESS_ID, VALID_MIN, VALID_MAX, ALLOWED_VALUES (list or
None), NULLABLE, NULL_MEANING, SENSITIVE (booleans or None), SENSITIVITY_REASON, AUTHOR, DB_USER, VALID_FROM.
as_of reads the declarations as they were at that valid time (VALIDTIME AS OF on the base tables,
primary store only). With read-only stores attached that offer the objects, the current read is their
union, the first store winning (a FEATURE_STORE column). An empty frame, with NO statement, when
nothing was ever declared in the store. Never raises on a read failure of an attached store.