From 7c663c5ced353af37d856057c647c08d98b16925 Mon Sep 17 00:00:00 2001 From: a-rampalli Date: Thu, 17 Aug 2023 18:39:38 +0530 Subject: [PATCH] fix: fixes issue blocking source creation --- .../connectors/source-mixpanel/source_mixpanel/spec.json | 4 ++-- .../source-mixpanel/source_mixpanel/streams/export.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json index a9a572c73972..a098e396cc95 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json @@ -83,7 +83,7 @@ "title": "Start Date", "type": "string", "description": "If not set, data from up to one year ago will replicated by default.", - "examples": ["2021-11-16"], + "examples": ["2021-07-25T00:00:00Z"], "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?$", "format": "date-time" }, @@ -91,7 +91,7 @@ "order": 6, "title": "End Date", "type": "string", - "examples": ["2021-11-16"], + "examples": ["2021-07-25T00:00:00Z"], "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?$", "format": "date-time" }, diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/streams/export.py b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/streams/export.py index 0b9c106b249c..7a662f2418ae 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/streams/export.py +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/streams/export.py @@ -145,7 +145,8 @@ def process_response(self, response: requests.Response, **kwargs) -> Iterable[Ma # We prefer response.iter_lines() to response.text.split_lines() as the later can missparse text properties embeding linebreaks for record in self.iter_dicts(response.iter_lines(decode_unicode=True)): # transform record into flat dict structure - item = {"mixpanel_event": record["event"]} + # Changed event property name to "mp_event" to avoid conflict with "event" reserved property + item = {"mp_event": record["event"]} properties = record["properties"] for result in transform_property_names(properties.keys()): # Convert all values to string (this is default property type)