1616from .dbt import dbt_diff
1717from .utils import eval_name_template , remove_password_from_url , safezip , match_like
1818from .diff_tables import Algorithm
19- from .hashdiff_tables import (
20- HashDiffer ,
21- DEFAULT_BISECTION_THRESHOLD ,
22- DEFAULT_BISECTION_FACTOR ,
23- )
19+ from .hashdiff_tables import HashDiffer , DEFAULT_BISECTION_THRESHOLD , DEFAULT_BISECTION_FACTOR
2420from .joindiff_tables import TABLE_WRITE_LIMIT , JoinDiffer
2521from .table_segment import TableSegment
2622from .databases import connect
@@ -103,20 +99,9 @@ def write_usage(self, prog: str, args: str = "", prefix: Optional[str] = None) -
10399@click .argument ("database2" , required = False )
104100@click .argument ("table2" , required = False )
105101@click .option (
106- "-k" ,
107- "--key-columns" ,
108- default = [],
109- multiple = True ,
110- help = "Names of primary key columns. Default='id'." ,
111- metavar = "NAME" ,
112- )
113- @click .option (
114- "-t" ,
115- "--update-column" ,
116- default = None ,
117- help = "Name of updated_at/last_updated column" ,
118- metavar = "NAME" ,
102+ "-k" , "--key-columns" , default = [], multiple = True , help = "Names of primary key columns. Default='id'." , metavar = "NAME"
119103)
104+ @click .option ("-t" , "--update-column" , default = None , help = "Name of updated_at/last_updated column" , metavar = "NAME" )
120105@click .option (
121106 "-c" ,
122107 "--columns" ,
@@ -127,13 +112,7 @@ def write_usage(self, prog: str, args: str = "", prefix: Optional[str] = None) -
127112 "Accepts a name or a pattern like in SQL. Example: -c col% -c another_col" ,
128113 metavar = "NAME" ,
129114)
130- @click .option (
131- "-l" ,
132- "--limit" ,
133- default = None ,
134- help = "Maximum number of differences to find" ,
135- metavar = "NUM" ,
136- )
115+ @click .option ("-l" , "--limit" , default = None , help = "Maximum number of differences to find" , metavar = "NUM" )
137116@click .option (
138117 "--bisection-factor" ,
139118 default = None ,
@@ -162,27 +141,15 @@ def write_usage(self, prog: str, args: str = "", prefix: Optional[str] = None) -
162141 metavar = "AGE" ,
163142)
164143@click .option (
165- "--max-age" ,
166- default = None ,
167- help = "Considers only rows younger than specified. See --min-age." ,
168- metavar = "AGE" ,
144+ "--max-age" , default = None , help = "Considers only rows younger than specified. See --min-age." , metavar = "AGE"
169145)
170146@click .option ("-s" , "--stats" , is_flag = True , help = "Print stats instead of a detailed diff" )
171147@click .option ("-d" , "--debug" , is_flag = True , help = "Print debug info" )
172- @click .option (
173- "--json" ,
174- "json_output" ,
175- is_flag = True ,
176- help = "Print JSONL output for machine readability" ,
177- )
148+ @click .option ("--json" , "json_output" , is_flag = True , help = "Print JSONL output for machine readability" )
178149@click .option ("-v" , "--verbose" , is_flag = True , help = "Print extra info" )
179150@click .option ("--version" , is_flag = True , help = "Print version info and exit" )
180151@click .option ("-i" , "--interactive" , is_flag = True , help = "Confirm queries, implies --debug" )
181- @click .option (
182- "--no-tracking" ,
183- is_flag = True ,
184- help = "data-diff sends home anonymous usage data. Use this to disable it." ,
185- )
152+ @click .option ("--no-tracking" , is_flag = True , help = "data-diff sends home anonymous usage data. Use this to disable it." )
186153@click .option (
187154 "--case-sensitive" ,
188155 is_flag = True ,
@@ -225,12 +192,7 @@ def write_usage(self, prog: str, args: str = "", prefix: Optional[str] = None) -
225192 help = "An additional 'where' expression to restrict the search space. Beware of SQL Injection!" ,
226193 metavar = "EXPR" ,
227194)
228- @click .option (
229- "-a" ,
230- "--algorithm" ,
231- default = Algorithm .AUTO .value ,
232- type = click .Choice ([i .value for i in Algorithm ]),
233- )
195+ @click .option ("-a" , "--algorithm" , default = Algorithm .AUTO .value , type = click .Choice ([i .value for i in Algorithm ]))
234196@click .option (
235197 "--conf" ,
236198 default = None ,
0 commit comments