Lee-W commented on code in PR #66520:
URL: https://github.com/apache/airflow/pull/66520#discussion_r3282024973
##########
airflow-core/src/airflow/cli/cli_config.py:
##########
@@ -1018,6 +1018,36 @@ def string_lower_type(val):
ARG_ASSET_URI = Arg(("--uri",), default="", help="Asset URI")
ARG_ASSET_ALIAS = Arg(("--alias",), default=False, action="store_true",
help="Show asset alias")
+# partitions clear
+ARG_PARTITIONS_CLEAR_DAG_ID = Arg(
+ ("-d", "--dag-id"),
+ help="The id of the Dag whose DagRun partition fields should be cleared",
+ required=True,
+)
+ARG_PARTITIONS_CLEAR_START_DATE = Arg(
+ ("-s", "--start-date"),
+ help="Only clear DagRuns whose partition_date is on or after this date",
+ type=parsedate,
+)
+ARG_PARTITIONS_CLEAR_END_DATE = Arg(
+ ("-e", "--end-date"),
+ help="Only clear DagRuns whose partition_date is on or before this date",
+ type=parsedate,
+)
Review Comment:
sounds good. it now supports
1. --date 2025-01-01~2025-01-31
2. --start-date 2025-01-01 --end-date 2025-01-31
3. --partition-key
----
yes, syntax like `--date 2025-01-01~2025-01-31`, clear the fields till
`2025-01-31` not inclueing `2025-02-01`
Yes, `--date 2025-01-01~2025-01-31` (or `--end-date 2025-01-31`) clears the
fields through 2025-01-31, excluding 2025-02-01. tested by
`test_date_range_end_of_day_clamp`. (01-03 is still there)
--
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]