tdfs4ds.deploy.fingerprint¶
tdfs4ds.deploy.fingerprint
¶
Normalised fingerprints of object definitions (0.3.8.15). Pure: no database, no clock.
The same object exported from one environment and read back from another must give the same
fingerprint when its definition is the same, whatever the databases are called and whatever the
process ids are. So a fingerprint is taken on the definition in its placeholder form
(databases are {{VAR}}, processes are named by their view), and:
- SQL goes through
process_sql.normalise_sql(comments, white space, case outside literals) afterprocess_sql.neutral_textreplaced every manager the object reads by one token: a TimeManager / FilterManager moving its cursor, a literal swap (run(at=...)) or a soft clone of the domain clock is no change of definition; - lists whose order carries no meaning (feature names) are sorted, dict keys are sorted;
- a manager is fingerprinted on its STRUCTURE (type, columns, calendar rule), never its contents;
- what only the first run creates (value types, statistics) is information, not definition.
SETTING_DEFAULTS
module-attribute
¶
SETTING_DEFAULTS = {'CLOSE_ABSENT_ENTITIES': 'N', 'TRACK_ENTITY_REFRESH': 'N', 'DATASET_TIME_MANAGER': None, 'DOMAIN_ROLL_OUT': 'Y', 'DATASET_VIEW_NAME': '', 'DATASET_GROUPED': 'N', 'DATASET_JOIN_TYPE': '', 'DATASET_REBUILD_ON_CHANGE': '', 'WINDOW_LENGTH': '', 'VALID_TIME_COLUMN': '', 'FORCE_VARCHAR_LENGTH': '1024'}
DOMAIN_STATE_SETTINGS
module-attribute
¶
_BY_KIND
module-attribute
¶
_BY_KIND = {'process': process_fingerprint, 'dataset': dataset_fingerprint, 'view': view_fingerprint, 'table': table_fingerprint, 'time_manager': manager_fingerprint, 'filter_manager': manager_fingerprint, 'domain': domain_fingerprint, 'glossary': glossary_fingerprint, 'documentation': documentation_fingerprint, 'requires': requires_fingerprint}
manager_refs
¶
[(kind, '{{VAR}}.VIEW')] of the managers a definition reads (process: its time / filter
manager and the domain clock; dataset: its TimeManager).
view_sql_fingerprint_text
¶
The normalised SQL of a view for comparison. A soft clone of a TimeManager (a view over a
*_HIDDEN table) names its cursor (WHERE TIME_ID = 3): that is state, moved by every roll-out,
not definition, so a deployed clone read as 'different' from the bundle (live, 0.3.8.15); the
registration rewrites the clone with SELECT where the bundle has SEL.
table_body
¶
The part of a CREATE TABLE that defines the table: from the column list on (table options
such as FALLBACK / MAP / journaling between the name and the column list are system settings).
documentation_parts
¶
{part key: normalised text} of a documentation definition.
documentation_covered
¶
True when every part of definition is in target with the same text (extra target parts are allowed: a deployment never deletes documentation). Pure.
fingerprint
¶
The fingerprint of a definition (None for None). Pure.