Skip to content

Commit cfb004b

Browse files
committed
Replace 'preview' with 'extract' in failing rows messages
1 parent bf5d204 commit cfb004b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

pointblank/cli.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ def missing(data_source: str, output_html: str | None):
14861486
help="Numeric value for comparison (required for col-vals-gt, col-vals-ge, col-vals-lt, and col-vals-le checks)",
14871487
)
14881488
@click.option(
1489-
"--show-extract", is_flag=True, help="Show preview of failing rows if validation fails"
1489+
"--show-extract", is_flag=True, help="Show extract of failing rows if validation fails"
14901490
)
14911491
@click.option(
14921492
"--write-extract", type=str, help="Save failing rows to folder. Provide base name for folder."
@@ -1988,10 +1988,10 @@ def validate(
19881988

19891989
# Dynamic message based on check type
19901990
if check == "rows-distinct":
1991-
extract_message = "[yellow]Preview of failing rows (duplicates):[/yellow]"
1991+
extract_message = "[yellow]Extract of failing rows (duplicates):[/yellow]"
19921992
row_type = "duplicate rows"
19931993
elif check == "rows-complete":
1994-
extract_message = "[yellow]Preview of failing rows (incomplete rows):[/yellow]"
1994+
extract_message = "[yellow]Extract of failing rows (incomplete rows):[/yellow]"
19951995
row_type = "incomplete rows"
19961996
elif check == "col-exists":
19971997
extract_message = (
@@ -2000,21 +2000,21 @@ def validate(
20002000
row_type = "missing column"
20012001
elif check == "col-vals-in-set":
20022002
extract_message = (
2003-
f"[yellow]Preview of failing rows (invalid values in '{column}'):[/yellow]"
2003+
f"[yellow]Extract of failing rows (invalid values in '{column}'):[/yellow]"
20042004
)
20052005
row_type = "rows with invalid values"
20062006
elif check == "col-vals-gt":
20072007
extract_message = (
2008-
f"[yellow]Preview of failing rows (values in '{column}' <= {value}):[/yellow]"
2008+
f"[yellow]Extract of failing rows (values in '{column}' <= {value}):[/yellow]"
20092009
)
20102010
row_type = f"rows with values <= {value}"
20112011
elif check == "col-vals-ge":
20122012
extract_message = (
2013-
f"[yellow]Preview of failing rows (values in '{column}' < {value}):[/yellow]"
2013+
f"[yellow]Extract of failing rows (values in '{column}' < {value}):[/yellow]"
20142014
)
20152015
row_type = f"rows with values < {value}"
20162016
else:
2017-
extract_message = "[yellow]Preview of failing rows:[/yellow]"
2017+
extract_message = "[yellow]Extract of failing rows:[/yellow]"
20182018
row_type = "failing rows"
20192019

20202020
if show_extract:
@@ -2836,7 +2836,7 @@ def make_template(output_file: str):
28362836
@click.option("--output-html", type=click.Path(), help="Save HTML validation report to file")
28372837
@click.option("--output-json", type=click.Path(), help="Save JSON validation summary to file")
28382838
@click.option(
2839-
"--show-extract", is_flag=True, help="Show preview of failing rows if validation fails"
2839+
"--show-extract", is_flag=True, help="Show extract of failing rows if validation fails"
28402840
)
28412841
@click.option(
28422842
"--write-extract",
@@ -2993,7 +2993,7 @@ def run(
29932993
console.print()
29942994

29952995
if show_extract:
2996-
extract_title = "Preview of failing rows from validation steps"
2996+
extract_title = "Extract of failing rows from validation steps"
29972997
if len(validations) > 1:
29982998
extract_title += f" (Validation {i})"
29992999
console.print(f"[yellow]{extract_title}:[/yellow]")

0 commit comments

Comments
 (0)