Skip to content

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']

KINDS module-attribute

KINDS = ('feature', 'process_view', 'dataset', 'documentation', 'lineage')

_FEATURE_COLS module-attribute

_FEATURE_COLS = ['FEATURE_ID', 'FEATURE_NAME', 'FEATURE_TYPE', 'FEATURE_TABLE', 'FEATURE_DATABASE', 'ENTITY_NAME', 'DATA_DOMAIN']

_PROCESS_COLS module-attribute

_PROCESS_COLS = ['PROCESS_ID', 'VIEW_NAME', 'DATA_DOMAIN', 'ENTITY_ID', 'FEATURE_NAMES']

_DATASET_COLS module-attribute

_DATASET_COLS = ['DATASET_ID', 'DATASET_NAME', 'DATASET_DATABASE']

_OBJECT_COLS module-attribute

_OBJECT_COLS = ['DATABASE_NAME', 'OBJECT_NAME', 'OBJECT_TYPE', 'BUSINESS_DESCRIPTION']

_SECTION_COLS module-attribute

_SECTION_COLS = ['DATABASE_NAME', 'OBJECT_NAME', 'SECTION_NAME', 'SECTION_CONTENT']

_COLUMN_COLS module-attribute

_COLUMN_COLS = ['DATABASE_NAME', 'TABLE_NAME', 'COLUMN_NAME', 'BUSINESS_DESCRIPTION']

_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_qualified(name)

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).

_u

_u(v)

_text

_text(v)

_bare

_bare(name)

_rows

_rows(sql, columns)

collect_conflict_inputs

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.

_order

_order(stores_seen, stores)

_row

_row(kind, domain, entity, name, part, ordered, differs, detail)

_feature_rows

_feature_rows(inputs, stores)

_named_rows

_named_rows(df, kind, stores, name_of, domain_col, entity_col, differs_of, detail_of)

_documentation_rows

_documentation_rows(inputs, stores)

_lineage_rows

_lineage_rows(inputs, stores)

find_conflicts

find_conflicts(inputs, kinds=None)

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

store_conflicts(kinds=None)

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

conflict_summary(df)

{'stores': [...], 'counts': {kind: n}, 'total': n, 'unverified': [...]} for the Report.