Skip to content

Commit

Permalink
🐛 source mixpanel: hardcoded 'standard' properties for engage stream (a…
Browse files Browse the repository at this point in the history
…irbytehq#7505)

* Hardcoded 'standard' properties for engage stream to avoid normalization error (particularly for 'browser_version')

* updated change log message

* bumped connector version, updated change log

* fix table in docs
  • Loading branch information
midavadim authored and schlattk committed Jan 4, 2022
1 parent 62d379e commit be668c5
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "12928b32-bf0a-4f1e-964f-07e12e37153a",
"name": "Mixpanel",
"dockerRepository": "airbyte/source-mixpanel",
"dockerImageTag": "0.1.2",
"dockerImageTag": "0.1.3",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/mixpanel",
"icon": "mixpanel.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
- name: Mixpanel
sourceDefinitionId: 12928b32-bf0a-4f1e-964f-07e12e37153a
dockerRepository: airbyte/source-mixpanel
dockerImageTag: 0.1.2
dockerImageTag: 0.1.3
documentationUrl: https://docs.airbyte.io/integrations/sources/mixpanel
icon: mixpanel.svg
sourceType: api
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mixpanel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.2
LABEL io.airbyte.version=0.1.3
LABEL io.airbyte.name=airbyte/source-mixpanel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,46 @@
"properties": {
"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"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ def get_json_schema(self) -> Mapping[str, Any]:
# from API: '$browser'
# to stream: 'browser'
property_name = property_name[1:]
schema["properties"][property_name] = types.get(property_type, {"type": ["null", "string"]})
# Do not overwrite 'standard' hard-coded properties, add 'custom' properties
if property_name not in schema["properties"]:
schema["properties"][property_name] = types.get(property_type, {"type": ["null", "string"]})

return schema

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/mixpanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Select the correct region \(EU or US\) for your Mixpanel project. See detail [he

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| `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 |
Expand Down

0 comments on commit be668c5

Please sign in to comment.