From 2cd70489fce6b584cf2f033298cee26fd103756f Mon Sep 17 00:00:00 2001 From: Morgan Kerle Date: Mon, 14 Apr 2025 17:07:31 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20today=5Fwith=5Ftimezone=20?= =?UTF-8?q?and=20min=20to=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the today_with_timezone and min macros to the list of macros defined in `declarative_component_schema.yaml`. This is important because this file is used to generate the YAML reference in Airbyte's documentation. See the fetchSchema script in main repository for details. --- .../declarative/declarative_component_schema.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml index 9d2b6d6b6..676c30fe1 100644 --- a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +++ b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml @@ -4262,6 +4262,14 @@ interpolation: examples: - "'{{ today_utc() }}' -> '2021-09-01'" - "'{{ today_utc().strftime('%Y/%m/%d')}}' -> '2021/09/01'" + - title: today_with_timezone + description: Returns the current date in the specified timezone. The output is a date object. + arguments: + timezone: timezone expressed as IANA keys format. + return_type: Date + examples: + - "'{{ today_with_timezone('Australia/Sydney') }}' -> '2021-09-01'" + - "'{{ today_with_timezone('Europe/Lisbon') }}' -> '2021-08-01'" - title: timestamp description: Converts a number or a string representing a datetime (formatted as ISO8601) to a timestamp. If the input is a number, it is converted to an int. If no timezone is specified, the string is interpreted as UTC. arguments: @@ -4273,6 +4281,13 @@ interpolation: - "'{{ timestamp('2022-02-28T00:00:00Z') }}' -> 1646006400" - "'{{ timestamp('2022-02-28 00:00:00Z') }}' -> 1646006400" - "'{{ timestamp('2022-02-28T00:00:00-08:00') }}' -> 1646035200" + - title: min + description: Returns the smallest object of a iterable, or or two or more arguments. + arguments: + args: iterable or a sequence of two or more arguments + examples: + - "'{{ min(2, 3) }}' -> 2" + - "'{{ min([2, 3]) }}' -> 2" - title: max description: Returns the largest object of a iterable, or or two or more arguments. arguments: