Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2043,9 +2043,15 @@ definitions:
- "$ref": "#/definitions/NoAuth"
- "$ref": "#/definitions/LegacySessionTokenAuthenticator"
fetch_properties_from_endpoint:
deprecated: true
deprecation_message: "Use `query_properties` field instead."
title: Fetch Properties from Endpoint
description: Allows for retrieving a dynamic set of properties from an API endpoint which can be injected into outbound request using the stream_partition.extra_fields.
"$ref": "#/definitions/PropertiesFromEndpoint"
query_properties:
title: Query Properties
description: For APIs that require explicit specification of the properties to query for, this component will take a static or dynamic set of properties (which can be optionally split into chunks) and allow them to be injected into an outbound request by accessing stream_partition.extra_fields.
"$ref": "#/definitions/QueryProperties"
request_parameters:
title: Query Parameters
description: Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2543,9 +2543,16 @@ class HttpRequester(BaseModelWithDeprecations):
)
fetch_properties_from_endpoint: Optional[PropertiesFromEndpoint] = Field(
None,
deprecated=True,
deprecation_message="Use `query_properties` field instead.",
description="Allows for retrieving a dynamic set of properties from an API endpoint which can be injected into outbound request using the stream_partition.extra_fields.",
title="Fetch Properties from Endpoint",
)
query_properties: Optional[QueryProperties] = Field(
None,
description="For APIs that require explicit specification of the properties to query for, this component will take a static or dynamic set of properties (which can be optionally split into chunks) and allow them to be injected into an outbound request by accessing stream_partition.extra_fields.",
title="Query Properties",
)
request_parameters: Optional[Union[Dict[str, Union[str, QueryProperties]], str]] = Field(
None,
description="Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,7 @@ def _get_url() -> str:
hasattr(model.requester, "fetch_properties_from_endpoint")
and model.requester.fetch_properties_from_endpoint
):
# todo: Deprecate this condition once dependent connectors migrate to query_properties
query_properties_definition = QueryPropertiesModel(
type="QueryProperties",
property_list=model.requester.fetch_properties_from_endpoint,
Expand All @@ -3231,6 +3232,11 @@ def _get_url() -> str:
model=query_properties_definition,
config=config,
)
elif hasattr(model.requester, "query_properties") and model.requester.query_properties:
query_properties = self.create_query_properties(
model=model.requester.query_properties,
config=config,
)

requester = self._create_component_from_model(
model=model.requester,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4404,21 +4404,23 @@ def test_simple_retriever_with_requester_properties_from_endpoint():
url_base: "https://api.hubapi.com"
http_method: "GET"
path: "adAnalytics"
fetch_properties_from_endpoint:
type: PropertiesFromEndpoint
property_field_path: [ "name" ]
retriever:
type: SimpleRetriever
requester:
type: HttpRequester
url_base: https://api.hubapi.com
path: "/properties/v2/dynamics/properties"
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
query_properties:
type: QueryProperties
property_list:
type: PropertiesFromEndpoint
property_field_path: [ "name" ]
retriever:
type: SimpleRetriever
requester:
type: HttpRequester
url_base: https://api.hubapi.com
path: "/properties/v2/dynamics/properties"
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
dynamic_properties_stream:
type: DeclarativeStream
incremental_sync:
Expand Down
Loading