Skip to content

Commit

Permalink
fix(source-intercom): conversation parts stream moved to per-partiiti…
Browse files Browse the repository at this point in the history
…on state (#46658)
  • Loading branch information
lazebnyi authored Oct 22, 2024
1 parent fb8063b commit f883bda
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: d8313939-3782-41b0-be29-b3ca20d8dd3a
dockerImageTag: 0.7.5
dockerImageTag: 0.8.0
dockerRepository: airbyte/source-intercom
documentationUrl: https://docs.airbyte.com/integrations/sources/intercom
githubIssueLabel: source-intercom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.7.5"
version = "0.8.0"
name = "source-intercom"
description = "Source implementation for Intercom Yaml."
authors = [ "Airbyte <[email protected]>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ definitions:
record_filter:
condition:
"{{ record['updated_at'] >= ( stream_state.get('prior_state',
{}).get('updated_at', 0) if stream_state else stream_slice.get('prior_state',
{}).get('updated_at', 0) ) }}"
{}).get('updated_at', 0) - (config.get('lookback_window', 0) * 86400) if stream_state else stream_slice.get('prior_state',
{}).get('updated_at', 0) ) - (config.get('lookback_window', 0) * 86400) }}"
segments:
description: "https://developers.intercom.com/intercom-api-reference/reference#list-segments"
$ref: "#/definitions/stream_semi_incremental"
Expand Down Expand Up @@ -740,7 +740,7 @@ definitions:
record_filter:
condition:
"{{ record['updated_at'] >= stream_state.get('prior_state', {}).get('updated_at',
0) }}"
0) - (config.get('lookback_window', 0) * 86400)}}"
conversation_parts:
$ref: "#/definitions/substream_semi_incremental"
incremental_sync:
Expand Down Expand Up @@ -1008,8 +1008,8 @@ definitions:
description: "https://developers.intercom.com/intercom-api-reference/reference/pagination-sorting-search#pagination"
condition:
"{{ record['updated_at'] >= ( stream_state.get('prior_state',
{}).get('updated_at', 0) if stream_state else stream_slice.get('prior_state',
{}).get('updated_at', 0) ) }}"
{}).get('updated_at', 0) - (config.get('lookback_window', 0) * 86400) if stream_state else stream_slice.get('prior_state',
{}).get('updated_at', 0) ) - (config.get('lookback_window', 0) * 86400)}}"
paginator:
type: "DefaultPaginator"
url_base: "#/definitions/requester/url_base"
Expand Down Expand Up @@ -2318,6 +2318,7 @@ definitions:
cursor_datetime_formats:
- "%s"
datetime_format: "%s"
lookback_window: "P{{ config.get('lookback_window', 0) }}D"
cursor_granularity: "PT1S"
step: "P{{ config.get('activity_logs_time_step', 30) }}D"
start_datetime:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
"description": "Set lower value in case of failing long running sync of Activity Logs stream.",
"examples": [30, 10, 5],
"order": 3
},
"lookback_window": {
"title": "Lookback window",
"description": "The number of days to shift the state value backward for record sync",
"examples": [60],
"default": 0,
"minimum": 0,
"type": "integer",
"order": 4
}
}
},
Expand Down
Loading

0 comments on commit f883bda

Please sign in to comment.