Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Added support for 'a.b.table_name' syntax #38

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions data_diff/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"-": "red",
}

def parse_table_name(t):
return tuple(t.split('.'))

@click.command()
@click.argument("db1_uri")
Expand Down Expand Up @@ -99,8 +101,8 @@ def main(
logging.error("Error while parsing age expression: %s" % e)
return

table1 = TableSegment(db1, (table1_name,), key_column, update_column, columns, **options)
table2 = TableSegment(db2, (table2_name,), key_column, update_column, columns, **options)
table1 = TableSegment(db1, parse_table_name(table1_name), key_column, update_column, columns, **options)
table2 = TableSegment(db2, parse_table_name(table2_name), key_column, update_column, columns, **options)

differ = TableDiffer(
bisection_factor=bisection_factor,
Expand Down
Loading