Diff

class wrgl.diff.RowDiff(off1=None, off2=None)

Row offsets from both tables.

Variables
  • off1 (int) – row offset from the first commit. If it is not defined, this row doesn’t exist in the first commit (was removed).

  • off2 (int) – row offset from the second commit. If it is not defined, this row doesn’t exist in the second commit (new addition).

Method generated by attrs for class RowDiff.

class wrgl.diff.ColumnProfileDiff(name=None, new_addition=None, removed=None, stats=None)

Changes in column profile.

Variables
  • name (str) – column name

  • new_addition (bool) – is this a newly added column

  • removed (bool) – is this a removed column

  • stats (list[dict]) – list of changes in statistics

Method generated by attrs for class ColumnProfileDiff.

class wrgl.diff.TableProfileDiff(old_rows_count=None, new_rows_count=None, columns=None)

Changes in table profile.

Variables
  • old_rows_count (int) – rows count in old table

  • new_rows_count (int) – rows count in new table

  • columns (list[ColumnProfileDiff]) – list of changes in column profile

Method generated by attrs for class TableProfileDiff.

class wrgl.diff.DiffResult(table_sum=None, old_table_sum=None, old_pk=None, pk=None, old_columns=None, columns=None, row_diff=None, data_profile=None)

Diff result. Learn more at diff endpoint

Variables
  • table_sum (str) – 16-bit checksum of the first table presented as hex string

  • old_table_sum (str) – 16-bit checksum of the second table presented as hex string

  • pk (list[int]) – list of indices of primary key columns of the first table

  • old_pk (list[int]) – list of indices of primary key columns of the second table

  • columns (list[str]) – list of column names of the first table

  • old_columns (list[str]) – list of column names of the second table

  • row_diff (list[RowDiff]) – list of rows that changed

  • data_profile (list[TableProfileDiff]) – changes in data profile

Method generated by attrs for class DiffResult.

property primary_key

Returns primary-key columns of the first commit

Return type

list[str]

property old_primary_key

Returns primary-key columns of the second commit

Return type

list[str]