Skip to content

tdfs4ds.process_store.registration_state

tdfs4ds.process_store.registration_state

Is a re-registration a no-op? (0.3.8.0, S5)

upload_features on a view that is already registered used to rewrite every catalog row, probe the storage definition again, record the options and settings and re-record the TimeManager, with the values the store already held: a registration that changes nothing cost the same ~70 statements as one that changes everything. :func:unchanged_registration answers, with three reads (the catalog row, the options, the settings), whether the call would write exactly what is recorded. Only then upload_features skips the writes and the checks that depend on them; everything else it does (run_now, the AI steps, the type and value-type refusals, the storage preparation, the lineage and process-SQL capture, the return value) is unchanged.

The answer is conservative: any argument this module does not compare (a storage tag, a valid-time column, a dataset option, an explicit force_varchar_length, a UAF ART view...), any difference, a store whose state cannot be read, the switch tdfs4ds.SKIP_UNCHANGED_REGISTRATION off, all give None and the full path runs. The only visible difference of a skipped registration is that the ValidStart of the metadata rows it did not rewrite does not move.

sql_literal

sql_literal(value)

Escape value for use inside a single-quoted SQL string literal.

For the DBC probes and catalog predicates that compare a name as data (WHERE DatabaseName = '…'). The caller supplies the surrounding quotes.

_norm

_norm(value) -> str

_same_json

_same_json(a, b) -> bool

process_row

process_row(view_name)

The catalog row registered on exactly this view_name text (what the registration matches on), as a dict, or None. One statement.

clone_would_act

clone_would_act(time_manager, soft_clone, detected) -> bool

Would _soft_clone_for_process create a clone for this call? (Mirrors its conditions.)

_setting_matches

_setting_matches(recorded, expected_flag: bool) -> bool

unchanged_registration

unchanged_registration(view_name, entity_id, feature_names, metadata, primary_index, partitioning, filtermanager, entity_null_substitute, time_manager, record_time_manager, close_absent_entities, track_entity_refresh, dataset_time_manager)

The PROCESS_ID already registered on view_name when this call would write exactly what is recorded, else None. Never raises (a failed read is None).