From 92655a87c8a886c115eef92f46923f0f65fb39d3 Mon Sep 17 00:00:00 2001 From: Vadym Ratniuk Date: Tue, 7 May 2024 23:15:52 +0300 Subject: [PATCH] update abnormal test --- .../integration_tests/abnormal_state.json | 4 +++- .../source_mixpanel/components.py | 22 ------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/airbyte-integrations/connectors/source-mixpanel/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-mixpanel/integration_tests/abnormal_state.json index 828816502f30..7d5b377ab16d 100644 --- a/airbyte-integrations/connectors/source-mixpanel/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-mixpanel/integration_tests/abnormal_state.json @@ -3,8 +3,10 @@ "type": "STREAM", "stream": { "stream_state": { + "36152117": { "date": "2030-01-01" }, "41833532": { "date": "2030-01-01" }, - "36152117": { "date": "2030-01-01" } + "41833755": { "date": "2030-01-01" }, + "41833700": { "date": "2030-01-01" } }, "stream_descriptor": { "name": "funnels" } } diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/components.py b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/components.py index f211a8a19c19..9d682be463c1 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/components.py +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/components.py @@ -253,28 +253,6 @@ def stream_slices(self) -> Iterable[StreamSlice]: yield from [] -class FunnelsLegacyToPerPartitionStateMigration(LegacyToPerPartitionStateMigration): - """ - Gor error when use custom StateMigration: - custom_component_class(**kwargs): - TypeError: LegacyToPerPartitionStateMigration.__init__() missing 2 required positional arguments: 'partition_router', 'cursor' - - """ - - partition_router: SubstreamPartitionRouter = None - cursor: DatetimeBasedCursor = None - config: Mapping[str, Any] - parameters: Mapping[str, Any] - - def migrate(self, stream_state: Mapping[str, Any]) -> Mapping[str, Any]: - state = super().migrate(stream_state) - for partition_state in state.get("states", []): - # add empty parent_slice attr to partition - if "parent_slice" not in partition_state.get("partition", {}): - partition_state["partition"]["parent_slice"] = {} - return state - - @dataclass class EngagePaginationStrategy(PageIncrement): """