Skip to content

Commit

Permalink
fix: set interpolation macro/filter titles to match the actual functi…
Browse files Browse the repository at this point in the history
…on name (#74)
  • Loading branch information
lmossman authored Nov 20, 2024
1 parent 19afe5a commit a2aef16
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions airbyte_cdk/sources/declarative/declarative_component_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2790,21 +2790,21 @@ interpolation:
- created_at: "2020-01-01 00:00:00.000+00:00"
- updated_at: "2020-01-02 00:00:00.000+00:00"
macros:
- title: Now (UTC)
- title: now_utc
description: Returns the current date and time in the UTC timezone.
arguments: {}
return_type: Datetime
examples:
- "'{{ now_utc() }}' -> '2021-09-01 00:00:00+00:00'"
- "'{{ now_utc().strftime('%Y-%m-%d') }}' -> '2021-09-01'"
- title: Today (UTC)
- title: today_utc
description: Returns the current date in UTC timezone. The output is a date object.
arguments: {}
return_type: Date
examples:
- "'{{ today_utc() }}' -> '2021-09-01'"
- "'{{ today_utc().strftime('%Y/%m/%d')}}' -> '2021/09/01'"
- title: Timestamp
- 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:
datetime: A string formatted as ISO8601 or an integer representing a unix timestamp
Expand All @@ -2815,15 +2815,15 @@ 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: Max
- title: max
description: Returns the largest object of a iterable, or or two or more arguments.
arguments:
args: iterable or a sequence of two or more arguments
return_type: Any
examples:
- "'{{ max(2, 3) }}' -> 3"
- "'{{ max([2, 3]) }}' -> 3"
- title: Day Delta
- title: day_delta
description: Returns the datetime of now() + num_days.
arguments:
num_days: The number of days to add to now
Expand All @@ -2833,16 +2833,16 @@ interpolation:
- "'{{ day_delta(1) }}' -> '2021-09-02T00:00:00.000000+0000'"
- "'{{ day_delta(-1) }}' -> '2021-08-31:00:00.000000+0000'"
- "'{{ day_delta(25, format='%Y-%m-%d') }}' -> '2021-09-02'"
- title: Duration
description: Converts an ISO8601 duratioin to datetime.timedelta.
- title: duration
description: Converts an ISO8601 duration to datetime timedelta.
arguments:
duration_string: "A string representing an ISO8601 duration. See https://www.digi.com/resources/documentation/digidocs//90001488-13/reference/r_iso_8601_duration_format.htm for more details."
return_type: datetime.timedelta
examples:
- "'{{ duration('P1D') }}' -> '1 day, 0:00:00'"
- "'{{ duration('P6DT23H') }}' -> '6 days, 23:00:00'"
- "'{{ (now_utc() - duration('P1D')).strftime('%Y-%m-%dT%H:%M:%SZ') }}' -> '2021-08-31T00:00:00Z'"
- title: Format Datetime
- title: format_datetime
description: Converts a datetime or a datetime-string to the specified format.
arguments:
datetime: The datetime object or a string to convert. If datetime is a string, it must be formatted as ISO8601.
Expand All @@ -2854,7 +2854,7 @@ interpolation:
- "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') }}"
- "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ', '%a, %d %b %Y %H:%M:%S %z') }}"
filters:
- title: Hash
- title: hash
description: Convert the specified value to a hashed string.
arguments:
hash_type: Valid hash type for converts ('md5' as default value).
Expand All @@ -2864,26 +2864,26 @@ interpolation:
- "{{ 'Test client_secret' | hash() }} -> '3032d57a12f76b61a820e47b9a5a0cbb'"
- "{{ 'Test client_secret' | hash('md5') }} -> '3032d57a12f76b61a820e47b9a5a0cbb'"
- "{{ 'Test client_secret' | hash('md5', salt='salt') }} -> '5011a0168579c2d94cbbe1c6ad14327c'"
- title: Base64 encoder
- title: base64encode
description: Convert the specified value to a string in the base64 format.
arguments: {}
return_type: str
examples:
- "{{ 'Test client_secret' | base64encode }} -> 'VGVzdCBjbGllbnRfc2VjcmV0'"
- title: Base64 decoder
- title: base64decode
description: Decodes the specified base64 format value into a common string.
arguments: {}
return_type: str
examples:
- "{{ 'ZmFrZSByZWZyZXNoX3Rva2VuIHZhbHVl' | base64decode }} -> 'fake refresh_token value'"
- title: String
- title: string
description: Converts the specified value to a string.
arguments: {}
return_type: str
examples:
- '{{ 1 | string }} -> "1"'
- '{{ ["hello", "world" | string }} -> "["hello", "world"]"'
- title: Regex Search
- title: regex_search
description: Match the input string against a regular expression and return the first match.
arguments:
regex: The regular expression to search for. It must include a capture group.
Expand Down

0 comments on commit a2aef16

Please sign in to comment.