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

Commit c7372a1

Browse files
committed
Better doc for the -c command.
1 parent e10e59d commit c7372a1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ Options:
195195
- `--help` - Show help message and exit.
196196
- `-k` or `--key-column` - Name of the primary key column
197197
- `-t` or `--update-column` - Name of updated_at/last_updated column
198-
- `-c` or `--columns` - Name or pattern of extra columns to compare. Pattern syntax is like SQL, e.g. `%foob.r%`.
198+
- `-c` or `--columns` - Names of extra columns to compare. Can be used more than once in the same command.
199+
Accepts a name or a pattern like in SQL.
200+
Example: `-c col% -c another_col -c %foorb.r%`
199201
- `-l` or `--limit` - Maximum number of differences to find (limits maximum bandwidth and runtime)
200202
- `-s` or `--stats` - Print stats instead of a detailed diff
201203
- `-d` or `--debug` - Print debug info

data_diff/__main__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ def _get_schema(pair):
5252
@click.argument("table2", required=False)
5353
@click.option("-k", "--key-column", default=None, help="Name of primary key column. Default='id'.")
5454
@click.option("-t", "--update-column", default=None, help="Name of updated_at/last_updated column")
55-
@click.option("-c", "--columns", default=[], multiple=True, help="Names of extra columns to compare")
55+
@click.option(
56+
"-c",
57+
"--columns",
58+
default=[],
59+
multiple=True,
60+
help="Names of extra columns to compare."
61+
"Can be used more than once in the same command. "
62+
"Accepts a name or a pattern like in SQL. Example: -c col% -c another_col",
63+
)
5664
@click.option("-l", "--limit", default=None, help="Maximum number of differences to find")
5765
@click.option("--bisection-factor", default=None, help=f"Segments per iteration. Default={DEFAULT_BISECTION_FACTOR}.")
5866
@click.option(

0 commit comments

Comments
 (0)