You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2022/04/25 12:53:45 UTC
[airflow] branch main updated: Update Param example code to add a default (#23212)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 81a2af3919 Update Param example code to add a default (#23212)
81a2af3919 is described below
commit 81a2af3919fa3932dd8cd190c6cad1439d0f4976
Author: Ephraim Anierobi <sp...@gmail.com>
AuthorDate: Mon Apr 25 13:53:40 2022 +0100
Update Param example code to add a default (#23212)
A param without a default value causes import error. Updated this example to
be runnable.
---
docs/apache-airflow/concepts/params.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/apache-airflow/concepts/params.rst b/docs/apache-airflow/concepts/params.rst
index fd4a167090..2a09eb5dd6 100644
--- a/docs/apache-airflow/concepts/params.rst
+++ b/docs/apache-airflow/concepts/params.rst
@@ -132,7 +132,8 @@ JSON Schema Validation
"int_param": Param(10, type="integer", minimum=0, maximum=20),
# a required param which can be of multiple types
- "dummy": Param(type=["null", "number", "string"]),
+ # a param must have a default value
+ "dummy": Param(5, type=["null", "number", "string"]),
# an enum param, must be one of three values
"enum_param": Param("foo", enum=["foo", "bar", 42]),