tdfs4ds.federation_conflicts¶
tdfs4ds.federation_conflicts
¶
Objects that exist in several attached stores (first store wins, 0.3.6.13).
With read-only stores attached (read_federation), a feature, a process view, a
dataset, a documented object or a lineage node can be recorded by more than one
store. The store listed first wins wherever one object is resolved; this module
lists the collisions so they are easy to see.
Same layers as assess_workflow: :func:collect_conflict_inputs (only I/O, a
failed read becomes an unverified entry), :func:find_conflicts (pure) and the
public :func:store_conflicts. The module is federation_conflicts because a
function named like its own submodule gets shadowed by the import system.
One store attached: nothing is read and the result is empty.
COLUMNS
module-attribute
¶
COLUMNS = ['KIND', 'DATA_DOMAIN', 'ENTITY', 'NAME', 'PART', 'WINNER_STORE', 'OTHER_STORES', 'DIFFERS', 'DETAIL']
_FEATURE_COLS
module-attribute
¶
_FEATURE_COLS = ['FEATURE_ID', 'FEATURE_NAME', 'FEATURE_TYPE', 'FEATURE_TABLE', 'FEATURE_DATABASE', 'ENTITY_NAME', 'DATA_DOMAIN']
_PROCESS_COLS
module-attribute
¶
_OBJECT_COLS
module-attribute
¶
_SECTION_COLS
module-attribute
¶
_COLUMN_COLS
module-attribute
¶
_LINEAGE_COLS
module-attribute
¶
_LINEAGE_COLS = ['PARENT_DATABASE_NAME', 'PARENT_OBJECT_NAME', 'PARENT_OBJECT_TYPE', 'CHILD_DATABASE_NAME', 'CHILD_OBJECT_NAME', 'CHILD_OBJECT_TYPE']
split_qualified
¶
Split db.obj into (database, object), both de-quoted.
Quote-aware, so a dot inside a quoted part does not split the name:
split_qualified('"DEINF.CARLOSN"."FS_X"') == ('DEINF.CARLOSN', 'FS_X').
The naive rsplit('.', 1) this replaces returns ('"DEINF.CARLOSN"',
'"FS_X"') only by luck and ('"DEINF', 'CARLOSN"."FS_X"') in the
split('.') variant.
An unqualified name returns ('', name).
collect_conflict_inputs
¶
Catalogs, business dictionary and lineage of every attached store, tagged
FEATURE_STORE. Only I/O; a failed read is listed under unverified.
find_conflicts
¶
The collisions found in inputs (see :func:collect_conflict_inputs). Pure.
Returns a DataFrame with COLUMNS; attrs['stores'] is the winning order
and attrs['unverified'] the reads that failed.
store_conflicts
¶
Objects that exist in several attached stores, the winner first.
kinds: any of 'feature', 'process_view', 'dataset',
'documentation', 'lineage' (default all). The store listed first wins
wherever one object is resolved (DIFFERS: the stores disagree on type,
text, feature list or edges; a feature's PART says first store has no process
when it resolves to nothing there while a later store computes it). Empty, and
nothing read, with one store.
.attrs['stores'] is the winning order, .attrs['unverified'] the reads
that failed.
conflict_summary
¶
{'stores': [...], 'counts': {kind: n}, 'total': n, 'unverified': [...]} for the Report.