tdfs4ds.deploy.sources¶
tdfs4ds.deploy.sources
¶
Readers of a feature store for deployment bundles (0.3.8.15): the only I/O of export and plan.
Every function reads (SELECT / SHOW / HELP, never a write: a source guard test checks it), names
the store's databases explicitly (never through read federation) and is fail-open: an object that
cannot be read gives None / an empty value and the caller says so. Tests replace these
functions; the pure layers (model, fingerprint, plan) never import teradataml.
_TYPE_CODES
module-attribute
¶
_TYPE_CODES = {'I': 'INTEGER', 'I1': 'BYTEINT', 'I2': 'SMALLINT', 'I8': 'BIGINT', 'F': 'FLOAT', 'DA': 'DATE', 'TS': 'TIMESTAMP', 'SZ': 'TIMESTAMP WITH TIME ZONE', 'AT': 'TIME', 'CO': 'CLOB', 'BO': 'BLOB', 'JN': 'JSON', 'PD': 'PERIOD(DATE)', 'PS': 'PERIOD(TIMESTAMP)'}
logger_safe
¶
Wrapper around the global logger that only emits logs when
tdfs4ds.DISPLAY_LOGS is True. level is a string like "info", "error", etc.
read_view_ddl
¶
SHOW VIEW text, None when absent or unreadable.
read_table_ddl
¶
SHOW TABLE text, None when absent or unreadable.
object_kinds
¶
{(DB, OBJ): TableKind} of the objects that exist (one DBC.TablesV read per database);
None when DBC cannot be read.
read_columns
¶
[{name, type}] in column order (type empty for a view), None when not listed.
read_process_catalog
¶
Current rows of FS_V_PROCESS_CATALOG of a store, None when unreadable.
read_process_extras
¶
read_process_extras(schema: str, view_schema: str, process_id: str, data_domain: Optional[str], feature_names: Iterable[str]) -> Dict[str, Any]
{settings, storage_tag, feature_types} of a process. Fail-open per part.
_manager_setting
¶
read_time_manager
¶
read_time_manager(schema: str, db: str, view: str, table_db: Optional[str] = None, table: Optional[str] = None, with_contents: bool = False) -> Optional[Dict[str, Any]]
Structure (data_type, calendar rule, previous) of a TimeManager, its number of dates,
and its dates when with_contents. None when its table of dates does not exist.
read_filter_manager
¶
read_filter_manager(db: str, view: str, table: Optional[str] = None, with_contents: bool = False) -> Optional[Dict[str, Any]]
Structure (filter_id_name, columns with types, time_filtering) of a FilterManager, its
number of rows, and its rows when with_contents. None when its table does not exist.
read_domain_settings
¶
read_feature_properties
¶
Declared feature properties of a domain (one dict per feature, ALLOWED_VALUES a JSON list).
read_glossary
¶
Glossary terms of a store (None = the primary): [{term, data_domain, meaning, synonyms, notes}].
read_attached
¶
{(DB, OBJ): kind} of the objects attached to a store (its ATTACHED markers), read from the
business-dictionary sections TABLE by explicit schema (0.3.8.15): the public sections view leaves the
reserved sections out, so a reader of the view finds no attached object and a deployment created the
attached views without attaching them (live). Fail-open: {}.
read_documentation
¶
read_documentation(view_schema: str, objects: Iterable[Tuple[str, str]], process_ids: Optional[Dict[Tuple[str, str], str]] = None) -> Dict[Tuple[str, str], Dict]
{(DB, OBJ): {object_type, description, sections, columns, process, provenance}} from a store's
business dictionary views (one read per table, IN lists). Objects without documentation are absent.
read_dataset
¶
read_dataset(desc: Dict[str, Any], o: Dict[str, Any], pid_to_view: Dict[str, str]) -> Optional[Dict[str, Any]]
{entity, features, build} of a dataset: what build_dataset / build_historical_dataset
needs to rebuild it, with each feature's producing process named by pid_to_view (pid -> view
name) instead of its id. None when the dataset cannot be read.
find_dataset
¶
{dataset_id, database, name} of a registered dataset, None when not registered.