You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: update descriptions and examples of complex fields (#661)
The titles, descriptions, and examples of some of the more complex fields in incremental sync and authenticator components were lacking a bit.
This PR updates them to add more detail and examples, and have more professional-looking titles, as these are now all used to power the labels and descriptions we show in the Builder UI.
This will help users when configuring these fields in the UI.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Documentation**
* Improved schema and model documentation for datetime-related fields, including detailed descriptions and examples for datetime formats and ISO8601 durations.
* Clarified default values and added illustrative examples for datetime properties, including current UTC time formatting.
* Enhanced descriptions and titles for several boolean options and pagination properties to improve clarity and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/declarative_component_schema.yaml
+82-18Lines changed: 82 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -940,14 +940,53 @@ definitions:
940
940
- "{{ config['record_cursor'] }}"
941
941
cursor_datetime_formats:
942
942
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.
944
943
type: array
945
944
items:
946
945
type: string
947
-
examples:
948
-
- "%Y-%m-%dT%H:%M:%S.%f%z"
949
-
- "%Y-%m-%d"
950
-
- "%s"
946
+
description: |
947
+
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.
948
+
Use placeholders starting with "%" to describe the format the API is using. The following placeholders are available:
949
+
* **%s**: Epoch unix timestamp - `1686218963`
950
+
* **%s_as_float**: Epoch unix timestamp in seconds as float with microsecond precision - `1686218963.123456`
* **%z**: UTC offset - `(empty)`, `+0000`, `-04:00`
969
+
* **%Z**: Time zone name - `(empty)`, `UTC`, `GMT`
970
+
* **%j**: Day of the year (zero-padded) - `001`, `002`, ..., `366`
971
+
* **%U**: Week number of the year (Sunday as first day) - `00`, `01`, ..., `53`
972
+
* **%W**: Week number of the year (Monday as first day) - `00`, `01`, ..., `53`
973
+
* **%c**: Date and time representation - `Tue Aug 16 21:30:00 1988`
974
+
* **%x**: Date representation - `08/16/1988`
975
+
* **%X**: Time representation - `21:30:00`
976
+
* **%%**: Literal '%' character
977
+
978
+
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).
979
+
examples:
980
+
- "%Y-%m-%d"
981
+
- "%Y-%m-%d %H:%M:%S"
982
+
- "%Y-%m-%dT%H:%M:%S"
983
+
- "%Y-%m-%dT%H:%M:%SZ"
984
+
- "%Y-%m-%dT%H:%M:%S%z"
985
+
- "%Y-%m-%dT%H:%M:%S.%fZ"
986
+
- "%Y-%m-%dT%H:%M:%S.%f%z"
987
+
- "%Y-%m-%d %H:%M:%S.%f+00:00"
988
+
- "%s"
989
+
- "%ms"
951
990
start_datetime:
952
991
title: Start Datetime
953
992
description: The datetime that determines the earliest record that should be synced.
@@ -1024,33 +1063,45 @@ definitions:
1024
1063
- "%s_as_float"
1025
1064
cursor_granularity:
1026
1065
title: Cursor Granularity
1027
-
description:
1066
+
description:|
1028
1067
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
1029
1068
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.
1069
+
* **PT0.000001S**: 1 microsecond
1070
+
* **PT0.001S**: 1 millisecond
1071
+
* **PT1S**: 1 second
1072
+
* **PT1M**: 1 minute
1073
+
* **PT1H**: 1 hour
1074
+
* **P1D**: 1 day
1030
1075
type: string
1031
1076
examples:
1032
1077
- "PT1S"
1033
1078
is_data_feed:
1034
-
title: Whether the target API is formatted as a data feed
1079
+
title: Data Feed API
1035
1080
description: A data feed API is an API that does not allow filtering and paginates the content from the most recent to the least recent. Given this, the CDK needs to know when to stop paginating and this field will generate a stop condition for pagination.
1036
1081
type: boolean
1037
1082
is_client_side_incremental:
1038
-
title: Whether the target API does not support filtering and returns all data (the cursor filters records in the client instead of the API side)
1039
-
description: If the target API endpoint does not take cursor values to filter records and returns all records anyway, the connector with this cursor will filter out records locally, and only emit new records from the last sync, hence incremental. This means that all records would be read from the API, but only new records will be emitted to the destination.
1083
+
title: Client-side Incremental Filtering
1084
+
description: Set to True if the target API endpoint does not take cursor values to filter records and returns all records anyway. This will cause the connector to filter out records locally, and only emit new records from the last sync, hence incremental. This means that all records would be read from the API, but only new records will be emitted to the destination.
1040
1085
type: boolean
1041
1086
is_compare_strictly:
1042
-
title: Whether to skip requests if the start time equals the end time
1043
-
description: Set to True if the target API does not accept queries where the start time equal the end time.
1087
+
title: Strict Start-End Time Comparison
1088
+
description: Set to True if the target API does not accept queries where the start time equal the end time. This will cause those requests to be skipped.
1044
1089
type: boolean
1045
1090
default: False
1046
1091
global_substream_cursor:
1047
-
title: Whether to store cursor as one value instead of per partition
1048
-
description: This setting optimizes performance when the parent stream has thousands of partitions by storing the cursor as a single value rather than per partition. Notably, the substream state is updated only at the end of the sync, which helps prevent data loss in case of a sync failure. See more info in the [docs](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/incremental-syncs).
1092
+
title: Global Substream Cursor
1093
+
description: Setting to True causes the connector to store the cursor as one value, instead of per-partition. This setting optimizes performance when the parent stream has thousands of partitions. Notably, the substream state is updated only at the end of the sync, which helps prevent data loss in case of a sync failure. See more info in the [docs](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/incremental-syncs).
1049
1094
type: boolean
1050
1095
default: false
1051
1096
lookback_window:
1052
1097
title: Lookback Window
1053
-
description: Time interval before the start_datetime to read data for, e.g. P1M for looking back one month.
1098
+
description: |
1099
+
Time interval (ISO8601 duration) before the start_datetime to read data for, e.g. P1M for looking back one month.
1100
+
* **PT1H**: 1 hour
1101
+
* **P1D**: 1 day
1102
+
* **P1W**: 1 week
1103
+
* **P1M**: 1 month
1104
+
* **P1Y**: 1 year
1054
1105
type: string
1055
1106
interpolation_context:
1056
1107
- config
@@ -1071,7 +1122,13 @@ definitions:
1071
1122
- "starting_time"
1072
1123
step:
1073
1124
title: Step
1074
-
description: The size of the time window (ISO8601 duration). Given this field is provided, `cursor_granularity` needs to be provided as well.
1125
+
description: |
1126
+
The size of the time window (ISO8601 duration). Given this field is provided, `cursor_granularity` needs to be provided as well.
1127
+
* **PT1H**: 1 hour
1128
+
* **P1D**: 1 day
1129
+
* **P1W**: 1 week
1130
+
* **P1M**: 1 month
1131
+
* **P1Y**: 1 year
1075
1132
type: string
1076
1133
examples:
1077
1134
- "P1W"
@@ -1911,7 +1968,13 @@ definitions:
1911
1968
type: string
1912
1969
expiration_duration:
1913
1970
title: Expiration Duration
1914
-
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.
1971
+
description: |
1972
+
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.
0 commit comments