forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 Source Iterable: add new streams (airbytehq#5915)
* Add new streams * Upd requirements versions * Upd docs * Remove tests for the templates stream * Upd csv field parsing * Fix file permissions * Set dependency version * Refactor * Merge * Upd licence * Add bulk metrics retrieving * Actualize schema
- Loading branch information
Showing
21 changed files
with
623 additions
and
1,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
airbyte-integrations/connectors/source-iterable/acceptance-test-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# See [Source Acceptance Tests](https://docs.airbyte.io/contributing-to-airbyte/building-new-connector/source-acceptance-tests.md) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-iterable:dev | ||
tests: | ||
spec: | ||
- spec_path: "source_iterable/spec.json" | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/catalog.json" | ||
empty_streams: ['email_send_skip', 'email_complaint'] | ||
full_refresh: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/catalog.json" | ||
incremental: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
future_state_path: "integration_tests/abnormal_state.json" |
15 changes: 15 additions & 0 deletions
15
airbyte-integrations/connectors/source-iterable/acceptance-test-docker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Build latest connector image | ||
docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2) | ||
|
||
# Pull latest acctest image | ||
docker pull airbyte/source-acceptance-test:latest | ||
|
||
# Run | ||
docker run --rm -it \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v /tmp:/tmp \ | ||
-v $(pwd):/test_input \ | ||
airbyte/source-acceptance-test \ | ||
--acceptance-test-config /test_input |
11 changes: 2 additions & 9 deletions
11
airbyte-integrations/connectors/source-iterable/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
plugins { | ||
id 'airbyte-python' | ||
id 'airbyte-docker' | ||
id 'airbyte-standard-source-test-file' | ||
id 'airbyte-source-acceptance-test' | ||
} | ||
|
||
airbytePython { | ||
moduleDirectory 'source_iterable' | ||
} | ||
|
||
airbyteStandardSourceTestFile { | ||
specPath = "source_iterable/spec.json" | ||
configPath = "secrets/config.json" | ||
configuredCatalogPath = "sample_files/configured_catalog.json" | ||
} | ||
|
||
|
||
dependencies { | ||
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) | ||
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs) | ||
} |
Empty file.
26 changes: 26 additions & 0 deletions
26
airbyte-integrations/connectors/source-iterable/integration_tests/abnormal_state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"users": { | ||
"profileUpdatedAt": "2121-04-14T17:00:41+00:00" | ||
}, | ||
"email_unsubscribe": { | ||
"createdAt": "2121-04-14T17:00:44+00:00" | ||
}, | ||
"email_subscribe": { | ||
"createdAt": "2121-04-14T16:52:45+00:00" | ||
}, | ||
"email_send": { | ||
"createdAt": "2121-04-14T16:25:56+00:00" | ||
}, | ||
"email_open": { | ||
"createdAt": "2121-04-14T17:00:11+00:00" | ||
}, | ||
"email_click": { | ||
"createdAt": "2121-04-14T16:55:14+00:00" | ||
}, | ||
"email_bounce": { | ||
"createdAt": "2121-04-14T16:29:39+00:00" | ||
}, | ||
"templates": { | ||
"createdAt": "2121-04-14T16:23:30.700000+00:00" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
airbyte-integrations/connectors/source-iterable/integration_tests/acceptance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import pytest | ||
|
||
pytest_plugins = ("source_acceptance_test.plugin",) | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def connector_setup(): | ||
"""This fixture is a placeholder for external resources that acceptance test might require.""" | ||
yield |
186 changes: 186 additions & 0 deletions
186
airbyte-integrations/connectors/source-iterable/integration_tests/catalog.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
{ | ||
"streams": [ | ||
{ | ||
"stream": { | ||
"name": "campaigns", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "campaigns_metrics", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "channels", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_bounce", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_click", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_complaint", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_open", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_send", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_send_skip", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_subscribe", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "email_unsubscribe", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "events", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "lists", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "list_users", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "message_types", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "metadata", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "overwrite" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "templates", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["createdAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
}, | ||
{ | ||
"stream": { | ||
"name": "users", | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_cursor": true, | ||
"default_cursor_field": ["profileUpdatedAt"] | ||
}, | ||
"sync_mode": "full_refresh", | ||
"destination_sync_mode": "append" | ||
} | ||
] | ||
} |
Oops, something went wrong.