diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/12928b32-bf0a-4f1e-964f-07e12e37153a.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/12928b32-bf0a-4f1e-964f-07e12e37153a.json index 838752941fd8e..5e60e40283170 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/12928b32-bf0a-4f1e-964f-07e12e37153a.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/12928b32-bf0a-4f1e-964f-07e12e37153a.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "12928b32-bf0a-4f1e-964f-07e12e37153a", "name": "Mixpanel", "dockerRepository": "airbyte/source-mixpanel", - "dockerImageTag": "0.1.5", + "dockerImageTag": "0.1.6", "documentationUrl": "https://docs.airbyte.io/integrations/sources/mixpanel", "icon": "mixpanel.svg" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 48e501a0b5815..68f808bf78e45 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -352,7 +352,7 @@ - name: Mixpanel sourceDefinitionId: 12928b32-bf0a-4f1e-964f-07e12e37153a dockerRepository: airbyte/source-mixpanel - dockerImageTag: 0.1.5 + dockerImageTag: 0.1.6 documentationUrl: https://docs.airbyte.io/integrations/sources/mixpanel icon: mixpanel.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index fbb4d03ef99d3..7aec34fc3ea3b 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -3675,7 +3675,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-mixpanel:0.1.5" +- dockerImage: "airbyte/source-mixpanel:0.1.6" spec: documentationUrl: "https://docs.airbyte.io/integrations/sources/mixpanel" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-mixpanel/Dockerfile b/airbyte-integrations/connectors/source-mixpanel/Dockerfile index 8a794a50784da..0d7479d28d12d 100644 --- a/airbyte-integrations/connectors/source-mixpanel/Dockerfile +++ b/airbyte-integrations/connectors/source-mixpanel/Dockerfile @@ -12,5 +12,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.5 +LABEL io.airbyte.version=0.1.6 LABEL io.airbyte.name=airbyte/source-mixpanel diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/cohort_members.json b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/cohort_members.json index 5ab14a9d75b9b..cdbdea8aaacd4 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/cohort_members.json +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/cohort_members.json @@ -8,6 +8,46 @@ }, "distinct_id": { "type": ["null", "string"] + }, + "browser": { + "type": ["null", "string"] + }, + "browser_version": { + "type": ["null", "string"] + }, + "city": { + "type": ["null", "string"] + }, + "country_code": { + "type": ["null", "string"] + }, + "region": { + "type": ["null", "string"] + }, + "timezone": { + "type": ["null", "string"] + }, + "last_seen": { + "type": ["null", "string"], + "format": "date-time" + }, + "email": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "first_name": { + "type": ["null", "string"] + }, + "last_name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + }, + "unblocked": { + "type": ["null", "string"] } } } diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/export.json b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/export.json index c533589f5643c..3c34db892269b 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/export.json +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/export.json @@ -14,17 +14,10 @@ "format": "date-time" }, "labels": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } - ] }, "sampling_factor": { "type": ["null", "integer"] diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/funnels.json b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/funnels.json index 368af0d951360..f94fe365b0bd2 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/funnels.json +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/schemas/funnels.json @@ -18,113 +18,92 @@ "format": "date-time" }, "steps": { - "anyOf": [ - { - "type": "array", - "items": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "additionalProperties": true, + "properties": { + "count": { + "type": ["null", "integer"] + }, + "avg_time": { + "type": ["null", "number"], + "multipleOf": 1e-20 + }, + "avg_time_from_start": { + "type": ["null", "number"], + "multipleOf": 1e-20 + }, + "goal": { + "type": ["null", "string"] + }, + "overall_conv_ratio": { + "type": ["null", "number"], + "multipleOf": 1e-20 + }, + "step_conv_ratio": { + "type": ["null", "number"], + "multipleOf": 1e-20 + }, + "event": { + "type": ["null", "string"] + }, + "session_event": { + "type": ["null", "string"] + }, + "step_label": { + "type": ["null", "string"] + }, + "selector": { + "type": ["null", "string"] + }, + "selector_params": { "type": ["null", "object"], "additionalProperties": true, "properties": { - "count": { - "type": ["null", "integer"] - }, - "avg_time": { - "type": ["null", "number"], - "multipleOf": 1e-20 - }, - "avg_time_from_start": { - "type": ["null", "number"], - "multipleOf": 1e-20 - }, - "goal": { - "type": ["null", "string"] - }, - "overall_conv_ratio": { - "type": ["null", "number"], - "multipleOf": 1e-20 - }, - "step_conv_ratio": { - "type": ["null", "number"], - "multipleOf": 1e-20 - }, - "event": { - "type": ["null", "string"] - }, - "session_event": { - "type": ["null", "string"] - }, "step_label": { "type": ["null", "string"] + } + } + }, + "time_buckets_from_start": { + "type": ["null", "object"], + "additionalProperties": false, + "properties": { + "lower": { + "type": ["null", "integer"] }, - "selector": { - "type": ["null", "string"] + "higher": { + "type": ["null", "integer"] }, - "selector_params": { - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "step_label": { - "type": ["null", "string"] - } + "buckets": { + "type": ["null", "array"], + "items": { + "type": "integer" } + } + } + }, + "time_buckets_from_prev": { + "type": ["null", "object"], + "additionalProperties": false, + "properties": { + "lower": { + "type": ["null", "integer"] }, - "time_buckets_from_start": { - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "lower": { - "type": ["null", "integer"] - }, - "higher": { - "type": ["null", "integer"] - }, - "buckets": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ] - } - } + "higher": { + "type": ["null", "integer"] }, - "time_buckets_from_prev": { - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "lower": { - "type": ["null", "integer"] - }, - "higher": { - "type": ["null", "integer"] - }, - "buckets": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ] - } + "buckets": { + "type": ["null", "array"], + "items": { + "type": "integer" } } } } - }, - { - "type": "null" } - ] + } }, "analysis": { "type": ["null", "object"], diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/source.py b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/source.py index da0895ae574f1..eaa83bbe0a73d 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/source.py +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/source.py @@ -16,6 +16,7 @@ from airbyte_cdk.logger import AirbyteLogger from airbyte_cdk.models import SyncMode from airbyte_cdk.sources import AbstractSource +from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer from airbyte_cdk.sources.streams import Stream from airbyte_cdk.sources.streams.http import HttpStream from airbyte_cdk.sources.streams.http.auth import HttpAuthenticator, TokenAuthenticator @@ -401,6 +402,9 @@ class Engage(MixpanelStream): page_size = 1000 # min 100 _total = None + # enable automatic object mutation to align with desired schema before outputting to the destination + transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization) + def path(self, **kwargs) -> str: return "engage" diff --git a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json index ac78eb60a4841..3e0d201d772e5 100644 --- a/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json +++ b/airbyte-integrations/connectors/source-mixpanel/source_mixpanel/spec.json @@ -8,38 +8,39 @@ "additionalProperties": true, "properties": { "api_secret": { + "title": "Api Secret", "type": "string", "description": "Mixpanel API Secret. See the docs for more information on how to obtain this key.", "airbyte_secret": true }, "attribution_window": { + "title": "Attribution Window", "type": "integer", "description": "Latency minimum number of days to look-back to account for delays in attributing accurate results. Default attribution window is 5 days.", "default": 5 }, - "date_window_size": { - "type": "integer", - "description": "Number of days for date window looping through transactional endpoints with from_date and to_date. Default date_window_size is 30 days. Clients with large volumes of events may want to decrease this to 14, 7, or even down to 1-2 days.", - "default": 30 - }, "project_timezone": { + "title": "Project Timezone", "type": "string", "description": "Time zone in which integer date times are stored. The project timezone may be found in the project settings in the Mixpanel console.", "default": "US/Pacific", "examples": ["US/Pacific", "UTC"] }, "select_properties_by_default": { + "title": "Select Properties By Default", "type": "boolean", "description": "Setting this config parameter to true ensures that new properties on events and engage records are captured. Otherwise new properties will be ignored", "default": true }, "start_date": { + "title": "Start Date", "type": "string", "description": "The default value to use if no bookmark exists for an endpoint. If this option is not set, the connector will replicate data from up to one year ago by default.", "examples": ["2021-11-16"], "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?$" }, "region": { + "title": "Region", "type": "string", "enum": ["US", "EU"], "default": "US" diff --git a/docs/integrations/sources/mixpanel.md b/docs/integrations/sources/mixpanel.md index 28f954cd2a14a..856d9669b0a0b 100644 --- a/docs/integrations/sources/mixpanel.md +++ b/docs/integrations/sources/mixpanel.md @@ -59,10 +59,11 @@ Select the correct region \(EU or US\) for your Mixpanel project. See detail [he | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| `0.1.6` | 2021-11-25 | [8256](https://github.com/airbytehq/airbyte/issues/8256) | Deleted `date_window_size` and fix schemas date type issue | | `0.1.5` | 2021-11-10 | [7451](https://github.com/airbytehq/airbyte/issues/7451) | Support `start_date` older than 1 year | | `0.1.4` | 2021-11-08 | [7499](https://github.com/airbytehq/airbyte/pull/7499) | Remove base-python dependencies | | `0.1.3` | 2021-10-30 | [7505](https://github.com/airbytehq/airbyte/issues/7505) | Guarantee that standard and custom mixpanel properties in the `Engage` stream are written as strings | | `0.1.2` | 2021-11-02 | [7439](https://github.com/airbytehq/airbyte/issues/7439) | Added delay for all streams to match API limitation of requests rate | | `0.1.1` | 2021-09-16 | [6075](https://github.com/airbytehq/airbyte/issues/6075) | Added option to select project region | -| `0.1.0` | 2021-07-06 | [3698](https://github.com/airbytehq/airbyte/issues/3698) | created CDK native mixpanel connector | +| `0.1.0` | 2021-07-06 | [3698](https://github.com/airbytehq/airbyte/issues/3698) | Created CDK native mixpanel connector |