Skip to content

Commit c68aa63

Browse files
authored
Merge branch 'main' into lmossman/add-suggestions-for-datetime-fields
2 parents aacbf16 + 56ab9b5 commit c68aa63

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4191,11 +4191,9 @@ definitions:
41914191
- stream_slice
41924192
- stream_template_config
41934193
examples:
4194-
- ["data"]
4195-
- ["data", "records"]
4196-
- ["data", 1, "name"]
4197-
- ["data", "{{ components_values.name }}"]
4198-
- ["data", "*", "record"]
4194+
- ["name"]
4195+
- ["retriever", "requester", "url"]
4196+
- ["retriever", "requester", "{{ components_values.field }}"]
41994197
- ["*", "**", "name"]
42004198
value:
42014199
title: Value
@@ -4826,6 +4824,12 @@ interpolation:
48264824
- title: stream_slice
48274825
description: This variable is deprecated. Use stream_interval or stream_partition instead.
48284826
type: object
4827+
- title: components_values
4828+
description: The record object produced by the components resolver for which a stream will be generated.
4829+
type: object
4830+
examples:
4831+
- name: "accounts"
4832+
id: 1234
48294833
macros:
48304834
- title: now_utc
48314835
description: Returns the current date and time in the UTC timezone.

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,11 +1463,9 @@ class ComponentMappingDefinition(BaseModel):
14631463
...,
14641464
description="A list of potentially nested fields indicating the full path where value will be added or updated.",
14651465
examples=[
1466-
["data"],
1467-
["data", "records"],
1468-
["data", 1, "name"],
1469-
["data", "{{ components_values.name }}"],
1470-
["data", "*", "record"],
1466+
["name"],
1467+
["retriever", "requester", "url"],
1468+
["retriever", "requester", "{{ components_values.field }}"],
14711469
["*", "**", "name"],
14721470
],
14731471
title="Field Path",

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,6 +2090,12 @@ def create_declarative_stream(
20902090
elif concurrent_cursor:
20912091
cursor = concurrent_cursor
20922092

2093+
# FIXME to be removed once we migrate everything to DefaultStream
2094+
if isinstance(retriever, SimpleRetriever):
2095+
# We zero it out here, but since this is a cursor reference, the state is still properly
2096+
# instantiated for the other components that reference it
2097+
retriever.cursor = None
2098+
20932099
partition_generator = StreamSlicerPartitionGenerator(
20942100
DeclarativePartitionFactory(
20952101
stream_name,

0 commit comments

Comments
 (0)