sryza commented on code in PR #51507:
URL: https://github.com/apache/spark/pull/51507#discussion_r2213971064
##########
python/pyspark/pipelines/cli.py:
##########
@@ -242,20 +264,56 @@ def run(spec_path: Path) -> None:
register_definitions(spec_path, registry, spec)
log_with_curr_timestamp("Starting run...")
- result_iter = start_run(spark, dataflow_graph_id)
+ result_iter = start_run(
+ spark,
+ dataflow_graph_id,
+ full_refresh=full_refresh,
+ full_refresh_all=full_refresh_all,
+ refresh=refresh,
+ )
try:
handle_pipeline_events(result_iter)
finally:
spark.stop()
+def parse_table_list(value: str) -> List[str]:
+ """Parse a comma-separated list of table names, handling whitespace."""
+ return [table.strip() for table in value.split(",") if table.strip()]
+
+
+def flatten_table_lists(table_lists: Optional[List[List[str]]]) ->
Optional[List[str]]:
+ """Flatten a list of lists of table names into a single list."""
+ if not table_lists:
+ return None
+ result = []
+ for table_list in table_lists:
+ result.extend(table_list)
+ return result if result else None
+
+
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Pipeline CLI")
subparsers = parser.add_subparsers(dest="command", required=True)
# "run" subcommand
run_parser = subparsers.add_parser("run", help="Run a pipeline.")
run_parser.add_argument("--spec", help="Path to the pipeline spec.")
+ run_parser.add_argument(
+ "--full-refresh",
+ type=parse_table_list,
+ action="append",
+ help="List of datasets to reset and recompute (comma-separated).",
Review Comment:
Will `extend` split using commas?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]