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
¶
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.
process_row
¶
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
¶
Would _soft_clone_for_process create a clone for this call? (Mirrors its conditions.)
registration_difference
¶
registration_difference(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, clone_of=None, info=None)
(process_id, None) when this call would write exactly what is recorded, else (process_id or
None, "<first field that differs: recorded X, now Y>"). Never raises (a failed read is a reason).
clone_of: (database, view) of the soft clone the call would make of time_manager (the domain
clock). A process already registered on that clone, whose view now names the clock again (the view
was re-created), is unchanged as far as the catalog goes: info['clone_pending'] is set so the
caller still repoints the view (the only write the full path would have made).
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, *, why=None, clone_of=None, info=None)
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). why: an optional list the first
difference (a text) is appended to, for the caller to log.