-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source Metabase: migrate to Beta YAML (#19236)
* migrated to YAMl * added changelog * added unit tests, refactor source, fixed ecpected records * fixed working with session token * added creating new session token if user passed invalid * removed custom auth in components, now it's in cdk * added config for auth, deleted unused tests and dependancies * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com> Co-authored-by: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com>
- Loading branch information
1 parent
346fc75
commit 469199a
Showing
8 changed files
with
162 additions
and
186 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
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
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
47 changes: 32 additions & 15 deletions
47
airbyte-integrations/connectors/source-metabase/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 |
---|---|---|
@@ -1,20 +1,37 @@ | ||
connector_image: airbyte/source-metabase:dev | ||
tests: | ||
acceptance_tests: | ||
spec: | ||
- spec_path: "source_metabase/spec.yaml" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "0.1.0" | ||
tests: | ||
- spec_path: "source_metabase/spec.yaml" | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
- config_path: "integration_tests/config_http_url.json" | ||
status: "failed" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
- config_path: "integration_tests/config_http_url.json" | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "0.1.0" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
empty_streams: | ||
- name: activity | ||
bypass_reason: "data changes very fast" | ||
- name: cards | ||
bypass_reason: "data changes very fast" | ||
- name: collections | ||
bypass_reason: "data changes very fast" | ||
- name: dashboards | ||
bypass_reason: "data changes very fast" | ||
- name: users | ||
bypass_reason: "data changes very fast" | ||
full_refresh: | ||
tests: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
incremental: | ||
bypass_reason: "This connector does not implement incremental sync" |
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
79 changes: 79 additions & 0 deletions
79
airbyte-integrations/connectors/source-metabase/source_metabase/metabase.yaml
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,79 @@ | ||
version: "0.3.0" | ||
|
||
definitions: | ||
selector: | ||
extractor: | ||
field_pointer: [ ] | ||
data_field_selector: | ||
type: RecordSelector | ||
extractor: | ||
type: DpathExtractor | ||
field_pointer: [ "data" ] | ||
requester: | ||
url_base: "{{ config['instance_api_url'] }}" | ||
http_method: "GET" | ||
authenticator: | ||
type: "SessionTokenAuthenticator" | ||
username: "{{ config['username'] }}" | ||
password: "{{ config['password'] }}" | ||
api_url: "{{ config['instance_api_url'] }}" | ||
header: "X-Metabase-Session" | ||
session_token: "{{ config['session_token'] }}" | ||
session_token_response_key: "id" | ||
login_url: "session" | ||
validate_session_url: "user/current" | ||
retriever: | ||
record_selector: | ||
$ref: "*ref(definitions.selector)" | ||
paginator: | ||
type: NoPagination | ||
requester: | ||
$ref: "*ref(definitions.requester)" | ||
data_field_retriever: | ||
record_selector: | ||
$ref: "*ref(definitions.data_field_selector)" | ||
paginator: | ||
type: NoPagination | ||
requester: | ||
$ref: "*ref(definitions.requester)" | ||
base_stream: | ||
primary_key: "id" | ||
retriever: | ||
$ref: "*ref(definitions.retriever)" | ||
activity_stream: | ||
$ref: "*ref(definitions.base_stream)" | ||
$options: | ||
name: "activity" | ||
path: "activity" | ||
cards_stream: | ||
$ref: "*ref(definitions.base_stream)" | ||
$options: | ||
name: "cards" | ||
path: "card" | ||
collections_stream: | ||
$ref: "*ref(definitions.base_stream)" | ||
$options: | ||
name: "collections" | ||
path: "collection" | ||
dashboards_stream: | ||
$ref: "*ref(definitions.base_stream)" | ||
$options: | ||
name: "dashboards" | ||
path: "dashboard" | ||
users_stream: | ||
primary_key: "id" | ||
retriever: | ||
$ref: "*ref(definitions.data_field_retriever)" | ||
$options: | ||
name: "users" | ||
path: "user" | ||
streams: | ||
- "*ref(definitions.activity_stream)" | ||
- "*ref(definitions.cards_stream)" | ||
- "*ref(definitions.collections_stream)" | ||
- "*ref(definitions.dashboards_stream)" | ||
- "*ref(definitions.users_stream)" | ||
|
||
check: | ||
stream_names: | ||
- "activity" |
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
Oops, something went wrong.