Skip to content

Commit

Permalink
✨Source Amplitude: Add Events List Stream (#43400)
Browse files Browse the repository at this point in the history
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
  • Loading branch information
topefolorunso and marcosmarxm authored Aug 9, 2024
1 parent 32c45a9 commit 871d5b3
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["server_upload_time"]
},
{
"stream": {
"name": "events_list",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
{"stream":"average_session_length","data":{"date":"2024-07-01T00:00:00","length":0.0},"emitted_at":1722380352267}
{"stream":"average_session_length","data":{"date":"2024-07-02T00:00:00","length":0.0},"emitted_at":1722380352269}
{"stream":"average_session_length","data":{"date":"2024-07-03T00:00:00","length":0.0},"emitted_at":1722380352271}
{"stream":"events_list","data":{"autohidden":false,"id":56782999,"value":"Daily Ad Metrics","display":"Daily Ad Metrics","hidden":false,"deleted":false,"flow_hidden":false,"timeline_hidden":false,"non_active":false,"in_waitroom":false,"waitroom_approved":null,"name":"Daily Ad Metrics","totals":0,"totals_delta":0},"emitted_at":1723221146371}
{"stream":"events_list","data":{"autohidden":false,"id":59048900,"value":"[Shopify] Checkout Started","display":"[Shopify] Checkout Started","hidden":false,"deleted":false,"flow_hidden":false,"timeline_hidden":false,"non_active":false,"in_waitroom":false,"waitroom_approved":null,"name":"[Shopify] Checkout Started","totals":0,"totals_delta":-1.0},"emitted_at":1723221146373}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: fa9f58c6-2d03-4237-aaa4-07d75e0c1396
dockerImageTag: 0.5.1
dockerImageTag: 0.6.0
dockerRepository: airbyte/source-amplitude
documentationUrl: https://docs.airbyte.com/integrations/sources/amplitude
githubIssueLabel: source-amplitude
Expand All @@ -35,6 +35,7 @@ data:
- active_users
- annotations
- cohorts
- events_list
supportLevel: certified
tags:
- language:python
Expand Down
249 changes: 133 additions & 116 deletions airbyte-integrations/connectors/source-amplitude/poetry.lock

Large diffs are not rendered by default.

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.5.1"
version = "0.6.0"
name = "source-amplitude"
description = "Source implementation for Amplitude."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,92 @@ definitions:
type:
- "null"
- object
events_list_stream:
type: DeclarativeStream
name: events_list
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/requester"
path: /2/events/list
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- data
schema_loader:
type: InlineSchemaLoader
schema:
type: object
$schema: http://json-schema.org/schema#
properties:
autohidden:
type:
- boolean
- "null"
clusters_hidden:
type:
- boolean
- "null"
deleted:
type:
- boolean
- "null"
display:
type:
- string
- "null"
flow_hidden:
type:
- boolean
- "null"
hidden:
type:
- boolean
- "null"
id:
type: number
in_waitroom:
type:
- boolean
- "null"
name:
type:
- string
- "null"
non_active:
type:
- boolean
- "null"
timeline_hidden:
type:
- boolean
- number
- "null"
totals:
type:
- number
- "null"
totals_delta:
type:
- number
- "null"
value:
type:
- string
- "null"
required:
- id
additionalProperties: true
streams:
- "#/definitions/annotations_stream"
- "#/definitions/cohorts_stream"
- "#/definitions/average_session_length_stream"
- "#/definitions/active_users_stream"
- "#/definitions/events_list_stream"

check:
stream_names:
Expand Down
2 changes: 2 additions & 0 deletions docs/integrations/sources/amplitude.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The Amplitude source connector supports the following streams:
- [Average Session Length](https://www.docs.developers.amplitude.com/analytics/apis/dashboard-rest-api/#get-average-session-length) \(Incremental sync\)
- [Cohorts](https://www.docs.developers.amplitude.com/analytics/apis/behavioral-cohorts-api/#get-all-cohorts-response)
- [Events](https://www.docs.developers.amplitude.com/analytics/apis/export-api/#response-schema) \(Incremental sync\)
- [Events List](https://amplitude.com/docs/apis/analytics/dashboard-rest#get-events-list)

If there are more endpoints you'd like Airbyte to support, please [create an issue.](https://github.com/airbytehq/airbyte/issues/new/choose)

Expand Down Expand Up @@ -57,6 +58,7 @@ The Amplitude connector ideally should gracefully handle Amplitude API limitatio

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
| 0.6.0 | 2024-08-08 | [43400](https://github.com/airbytehq/airbyte/pull/43400) | Add Events List Stream |
| 0.5.1 | 2024-08-03 | [43267](https://github.com/airbytehq/airbyte/pull/43267) | Update dependencies |
| 0.5.0 | 2024-08-01 | [42565](https://github.com/airbytehq/airbyte/pull/42565) | Migrate to CDK v4.0.2 |
| 0.4.2 | 2024-07-27 | [42618](https://github.com/airbytehq/airbyte/pull/42618) | Update dependencies |
Expand Down

0 comments on commit 871d5b3

Please sign in to comment.