Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Source Chargebee: Adds fields, Adds streams, removes bypass for strea…
Browse files Browse the repository at this point in the history
…ms, adds expected records (airbytehq#33696)
  • Loading branch information
pnilan authored Jan 3, 2024
1 parent 4a4ab19 commit 69da92e
Show file tree
Hide file tree
Showing 13 changed files with 495 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,43 @@ acceptance_tests:
timeout_seconds: 1200
empty_streams:
- name: "addon"
bypass_reason: "Not permitted for this site"
bypass_reason: "Not available for Product Catalog 2.0 sites."
- name: "plan"
bypass_reason: "Not permitted for this site"
bypass_reason: "Not available for Product Catalog 2.0 sites."
- name: "virtual_bank_account"
bypass_reason: "Cannot populate with test data"
- name: "subscription"
bypass_reason: "Unstable data. Field current_term_start updated daily"
- name: "customer"
bypass_reason: "Unstable data. Depends on subscription"
- name: "invoice"
bypass_reason: "Unstable data. Depends on subscription"
- name: "credit_note"
bypass_reason: "Unstable data. Depends on subscription"
- name: "event"
bypass_reason: "Unstable data. Depends on subscription"
- name: "unbilled_charge"
bypass_reason: "Empty stream. Unstable data"
- name: "hosted_page"
bypass_reason: "Empty stream. Unstable data"
- name: "event"
bypass_reason: "Unstable data. Updated daily."
- name: "site_migration_detail"
bypass_reason: "Cannnot populate with test data."
ignored_fields:
subscription:
- name: "current_term_start"
bypass_reason: "Field updated daily."
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
fail_on_extra_columns: false
incremental:
# tests:
# - config_path: "secrets/config.json"
# timeout_seconds: 2400
# configured_catalog_path: "integration_tests/configured_catalog.json"
# future_state:
# future_state_path: "integration_tests/future_state.json"
# missing_streams:
# - name: attached_item
# bypass_reason: "This stream is Full-Refresh only"
# - name: contact
# bypass_reason: "This stream is Full-Refresh only"
# - name: quote_line_group
# bypass_reason: "This stream is Full-Refresh only"
bypass_reason: >
"Incrremental tests are disabled until CAT works with cursor data-types directly,
relatated slack thread: https://airbyte-globallogic.slack.com/archives/C02U9R3AF37/p1690810513681859"
tests:
- config_path: "secrets/config.json"
timeout_seconds: 2400
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state:
future_state_path: "integration_tests/future_state.json"
missing_streams:
- name: attached_item
bypass_reason: "This stream is Full-Refresh only"
- name: contact
bypass_reason: "This stream is Full-Refresh only"
- name: quote_line_group
bypass_reason: "This stream is Full-Refresh only"
full_refresh:
tests:
- config_path: "secrets/config.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,58 @@
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "site_migration_detail",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["migrated_at"],
"source_defined_primary_key": [["entity_id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["migrated_at"]
},
{
"stream": {
"name": "comment",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["created_at"]
},
{
"stream": {
"name": "item_family",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["updated_at"]
},
{
"stream": {
"name": "differential_price",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["updated_at"]
}
]
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,33 @@
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "transaction" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "migrated_at": 2147483647 },
"stream_descriptor": { "name": "site_migration_detail" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "created_at": 2147483647 },
"stream_descriptor": { "name": "comment" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "item_family" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "differential_price" }
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,33 @@
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "transaction" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "migrated_at": 1625596058 },
"stream_descriptor": { "name": "site_migration_detail" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "created_at": 1625596058 },
"stream_descriptor": { "name": "comment" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "item_family" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "differential_price" }
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 686473f1-76d9-4994-9cc7-9b13da46147c
dockerImageTag: 0.2.6
dockerImageTag: 0.3.0
dockerRepository: airbyte/source-chargebee
documentationUrl: https://docs.airbyte.com/integrations/sources/chargebee
githubIssueLabel: source-chargebee
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,54 @@ definitions:
name: "quote_line_group"
primary_key: "id"
path: "/quotes/{{ stream_slice.id }}/quote_line_groups"
site_migration_detail_stream:
$ref: "#/definitions/base_stream"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/retriever/requester"
request_parameters:
sort_by[asc]: migrated_at
include_deleted: "true"
migrated_at[between]: "'[{{stream_slice['start_time']}}, {{stream_slice['end_time']}}]'"
incremental_sync:
$ref: "#/definitions/date_stream_slicer"
$parameters:
name: "site_migration_detail"
primary_key: "entity_id"
path: "/site_migration_details"
stream_cursor_field: "migrated_at"
comment_stream:
$ref: "#/definitions/base_stream"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/retriever/requester"
request_parameters:
sort_by[asc]: created_at
include_deleted: "true"
created_at[between]: "'[{{stream_slice['start_time']}}, {{stream_slice['end_time']}}]'"
incremental_sync:
$ref: "#/definitions/date_stream_slicer"
$parameters:
name: "comment"
primary_key: "id"
path: "/comments"
stream_cursor_field: "created_at"
item_family_stream:
$ref: "#/definitions/base_incremental_stream"
$parameters:
name: "item_family"
primary_key: "id"
path: "/item_families"
stream_cursor_field: "updated_at"
differential_price_stream:
$ref: "#/definitions/base_incremental_stream"
$parameters:
name: "differential_price"
primary_key: "id"
path: "/differential_prices"
stream_cursor_field: "updated_at"

streams:
- "#/definitions/addon_stream"
Expand All @@ -339,6 +387,10 @@ streams:
- "#/definitions/virtual_bank_account_stream"
- "#/definitions/quote_stream"
- "#/definitions/quote_line_group_stream"
- "#/definitions/site_migration_detail_stream"
- "#/definitions/comment_stream"
- "#/definitions/item_family_stream"
- "#/definitions/differential_price_stream"

check:
stream_names:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Comment",
"type": "object",
"properties": {
"id": {
"type": ["string", "null"]
},
"entity_type": {
"type": ["string", "null"]
},
"added_by": {
"type": ["string", "null"]
},
"notes": {
"type": ["string", "null"]
},
"created_at": {
"type": ["integer", "null"]
},
"type": {
"type": ["string", "null"]
},
"entity_id": {
"type": ["string", "null"]
},
"object": {
"type": ["string", "null"]
},
"custom_fields": {
"type": ["array", "null"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Add-on",
"type": "object",
"properties": {
"id": {
"type": ["string", "null"]
},
"item_price_id": {
"type": ["string", "null"]
},
"parent_item_id": {
"type": ["string", "null"]
},
"price": {
"type": ["integer", "null"]
},
"price_in_decimal": {
"type": ["string", "null"]
},
"status": {
"type": ["string", "null"]
},
"resource_version": {
"type": ["integer", "null"]
},
"updated_at": {
"type": ["integer", "null"]
},
"created_at": {
"type": ["integer", "null"]
},
"modified_at": {
"type": ["integer", "null"]
},
"currency_code": {
"type": ["string", "null"]
},
"tiers": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"starting_unit": {
"type": ["integer", "null"]
},
"ending_unit": {
"type": ["integer", "null"]
},
"price": {
"type": ["integer", "null"]
}
}
}
},
"parent_periods": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"period_unit": {
"type": ["string", "null"]
},
"period": {
"type": ["array", "null"],
"items": {
"type": ["integer", "null"]
}
}
}
}
},
"object": {
"type": ["string", "null"]
}
}
}
Loading

0 comments on commit 69da92e

Please sign in to comment.