Skip to content

Commit aece70a

Browse files
committed
include examples and descriptions of time intervals
1 parent 410f3c8 commit aece70a

1 file changed

Lines changed: 43 additions & 18 deletions

File tree

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,9 @@ definitions:
940940
- "{{ config['record_cursor'] }}"
941941
cursor_datetime_formats:
942942
title: Cursor Datetime Formats
943+
type: array
944+
items:
945+
type: string
943946
description: |
944947
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.
945948
@@ -974,20 +977,17 @@ definitions:
974977
* **%%**: Literal '%' character
975978
976979
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).
977-
type: array
978-
items:
979-
type: string
980-
examples:
981-
- "%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"
989-
- "%s"
990-
- "%ms"
980+
examples:
981+
- "%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"
989+
- "%s"
990+
- "%ms"
991991
start_datetime:
992992
title: Start Datetime
993993
description: The datetime that determines the earliest record that should be synced.
@@ -1068,9 +1068,15 @@ definitions:
10681068
- "%s_as_float"
10691069
cursor_granularity:
10701070
title: Cursor Granularity
1071-
description:
1071+
description: |
10721072
Smallest increment the datetime_format has (ISO 8601 duration) that is used to ensure the start of a slice does not overlap with the end of the previous one, e.g. for %Y-%m-%d the granularity should
10731073
be P1D, for %Y-%m-%dT%H:%M:%SZ the granularity should be PT1S. Given this field is provided, `step` needs to be provided as well.
1074+
* **PT0.000001S**: 1 microsecond
1075+
* **PT0.001S**: 1 millisecond
1076+
* **PT1S**: 1 second
1077+
* **PT1M**: 1 minute
1078+
* **PT1H**: 1 hour
1079+
* **P1D**: 1 day
10741080
type: string
10751081
examples:
10761082
- "PT1S"
@@ -1094,7 +1100,13 @@ definitions:
10941100
default: false
10951101
lookback_window:
10961102
title: Lookback Window
1097-
description: Time interval before the start_datetime to read data for, e.g. P1M for looking back one month.
1103+
description: |
1104+
Time interval (ISO8601 duration) before the start_datetime to read data for, e.g. P1M for looking back one month.
1105+
* **PT1H**: 1 hour
1106+
* **P1D**: 1 day
1107+
* **PT1W**: 1 week
1108+
* **P1M**: 1 month
1109+
* **P1Y**: 1 year
10981110
type: string
10991111
interpolation_context:
11001112
- config
@@ -1115,7 +1127,13 @@ definitions:
11151127
- "starting_time"
11161128
step:
11171129
title: Step
1118-
description: The size of the time window (ISO8601 duration). Given this field is provided, `cursor_granularity` needs to be provided as well.
1130+
description: |
1131+
The size of the time window (ISO8601 duration). Given this field is provided, `cursor_granularity` needs to be provided as well.
1132+
* **PT1H**: 1 hour
1133+
* **P1D**: 1 day
1134+
* **PT1W**: 1 week
1135+
* **P1M**: 1 month
1136+
* **P1Y**: 1 year
11191137
type: string
11201138
examples:
11211139
- "P1W"
@@ -1955,7 +1973,13 @@ definitions:
19551973
type: string
19561974
expiration_duration:
19571975
title: Expiration Duration
1958-
description: The duration in ISO 8601 duration notation after which the session token expires, starting from the time it was obtained. Omitting it will result in the session token being refreshed for every request.
1976+
description: |
1977+
The duration in ISO 8601 duration notation after which the session token expires, starting from the time it was obtained. Omitting it will result in the session token being refreshed for every request.
1978+
* **PT1H**: 1 hour
1979+
* **P1D**: 1 day
1980+
* **PT1W**: 1 week
1981+
* **P1M**: 1 month
1982+
* **P1Y**: 1 year
19591983
type: string
19601984
examples:
19611985
- "PT1H"
@@ -2737,6 +2761,7 @@ definitions:
27372761
- 2021-01-01
27382762
- 2021-01-01T00:00:00Z
27392763
- "{{ config['start_time'] }}"
2764+
- "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}"
27402765
datetime_format:
27412766
title: Datetime Format
27422767
description: |

0 commit comments

Comments
 (0)