Skip to content

Commit b96d11d

Browse files
committed
update descriptions defaults and examples of complex fields
1 parent e264808 commit b96d11d

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,14 +940,54 @@ definitions:
940940
- "{{ config['record_cursor'] }}"
941941
cursor_datetime_formats:
942942
title: Cursor Datetime Formats
943-
description: The possible formats for the cursor field, in order of preference. The first format that matches the cursor field value will be used to parse it. If not provided, the `datetime_format` will be used.
943+
description: |
944+
The possible formats for the cursor field, in order of preference. The first format that matches the cursor field value will be used to parse it. If not provided, the Outgoing Datetime Format will be used.
945+
946+
Use placeholders starting with "%" to describe the format the API is using. The following placeholders are available:
947+
* **%s**: Epoch unix timestamp - `1686218963`
948+
* **%s_as_float**: Epoch unix timestamp in seconds as float with microsecond precision - `1686218963.123456`
949+
* **%ms**: Epoch unix timestamp - `1686218963123`
950+
* **%a**: Weekday (abbreviated) - `Sun`
951+
* **%A**: Weekday (full) - `Sunday`
952+
* **%w**: Weekday (decimal) - `0` (Sunday), `6` (Saturday)
953+
* **%d**: Day of the month (zero-padded) - `01`, `02`, ..., `31`
954+
* **%b**: Month (abbreviated) - `Jan`
955+
* **%B**: Month (full) - `January`
956+
* **%m**: Month (zero-padded) - `01`, `02`, ..., `12`
957+
* **%y**: Year (without century, zero-padded) - `00`, `01`, ..., `99`
958+
* **%Y**: Year (with century) - `0001`, `0002`, ..., `9999`
959+
* **%H**: Hour (24-hour, zero-padded) - `00`, `01`, ..., `23`
960+
* **%I**: Hour (12-hour, zero-padded) - `01`, `02`, ..., `12`
961+
* **%p**: AM/PM indicator
962+
* **%M**: Minute (zero-padded) - `00`, `01`, ..., `59`
963+
* **%S**: Second (zero-padded) - `00`, `01`, ..., `59`
964+
* **%f**: Microsecond (zero-padded to 6 digits) - `000000`, `000001`, ..., `999999`
965+
* **%_ms**: Millisecond (zero-padded to 3 digits) - `000`, `001`, ..., `999`
966+
* **%z**: UTC offset - `(empty)`, `+0000`, `-04:00`
967+
* **%Z**: Time zone name - `(empty)`, `UTC`, `GMT`
968+
* **%j**: Day of the year (zero-padded) - `001`, `002`, ..., `366`
969+
* **%U**: Week number of the year (Sunday as first day) - `00`, `01`, ..., `53`
970+
* **%W**: Week number of the year (Monday as first day) - `00`, `01`, ..., `53`
971+
* **%c**: Date and time representation - `Tue Aug 16 21:30:00 1988`
972+
* **%x**: Date representation - `08/16/1988`
973+
* **%X**: Time representation - `21:30:00`
974+
* **%%**: Literal '%' character
975+
976+
Some placeholders depend on the locale of the underlying system - in most cases this locale is configured as en/US. For more information see the [Python documentation](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes).
944977
type: array
945978
items:
946979
type: string
947980
examples:
948-
- "%Y-%m-%dT%H:%M:%S.%f%z"
949981
- "%Y-%m-%d"
982+
- "%Y-%m-%d %H:%M:%S"
983+
- "%Y-%m-%dT%H:%M:%S"
984+
- "%Y-%m-%dT%H:%M:%SZ"
985+
- "%Y-%m-%dT%H:%M:%S%z"
986+
- "%Y-%m-%dT%H:%M:%S.%fZ"
987+
- "%Y-%m-%dT%H:%M:%S.%f%z"
988+
- "%Y-%m-%d %H:%M:%S.%f+00:00"
950989
- "%s"
990+
- "%ms"
951991
start_datetime:
952992
title: Start Datetime
953993
description: The datetime that determines the earliest record that should be synced.
@@ -967,6 +1007,10 @@ definitions:
9671007
end_datetime:
9681008
title: End Datetime
9691009
description: The datetime that determines the last record that should be synced. If not provided, `{{ now_utc() }}` will be used.
1010+
default:
1011+
type: MinMaxDatetime
1012+
datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}"
1013+
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
9701014
anyOf:
9711015
- "$ref": "#/definitions/MinMaxDatetime"
9721016
- type: string

0 commit comments

Comments
 (0)