shivaam commented on code in PR #74543:
URL: https://github.com/apache/airflow/pull/74543#discussion_r4304530813


##########
ts-sdk/README.md:
##########
@@ -65,6 +65,24 @@ A Dag also has order-only dependencies (`before` and 
`after`), task groups, bran
 
[guide](https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/language-sdks/typescript.html)
 for all of them.
 
+To trigger another Dag with a specific logical date and earliest start time:
+
+```ts
+import { triggerDagRun } from "apache-airflow-ts-sdk";
+
+dag.task(
+  triggerDagRun({
+    dagId: "report",
+    logicalDate: new Date("2026-10-01T00:00:00Z"),
+    runAfter: new Date("2026-10-01T06:00:00Z"),
+  }),
+  { taskId: "trigger_report" },
+)();
+```
+
+`logicalDate` may be omitted, set to a `Date`, or set to `null` for a run 
without a logical date.
+`runAfter` is sent only when set. These values are sent as written and are not 
Jinja-rendered.

Review Comment:
   can be simplified in my opinion
   When neither date is supplied, logicalDate defaults to the current time. 
Supplying only runAfter, or setting logicalDate: null, creates a run without a 
logical date. Dates are serialized as UTC ISO timestamps. If runAfter is 
omitted, Airflow defaults it to the current time. Jinja templates are not 
evaluated.



-- 
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]

Reply via email to