Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Chargebee: Adds fields, Adds streams, removes bypass for streams, adds expected records #33696

Merged
merged 24 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c054d37
Added `site_migration_detail` schema
pnilan Dec 14, 2023
642545b
Added `site_migration_detail` stream
pnilan Dec 15, 2023
1810e4b
Removed bypass for `subscription` stream
pnilan Dec 20, 2023
a6952ae
Fixed subscription ignored_field
pnilan Dec 20, 2023
570d29a
Removed bypass for `customer` read test
pnilan Dec 20, 2023
329bd10
Removed CAT bypass for basic read for `invoice` stream
pnilan Dec 20, 2023
a76a34c
Fixed invoice schema
pnilan Dec 20, 2023
5019e5a
Updated invoice schema to include additional fields
pnilan Dec 21, 2023
7b917d5
Set "additionalProperties" to true for invoice stream
pnilan Dec 21, 2023
177c5a0
Removed `additionalProperties` property from invoie schema. Added add…
pnilan Dec 21, 2023
e5e40fb
Fix `invoice` schema to pass CATs
pnilan Dec 22, 2023
ed5b4e7
Remove bypass for `credit_invoice` stream and add relevant expected r…
pnilan Dec 26, 2023
e3f1bdc
Remove bypass for `event` stream and add relevant expected records
pnilan Dec 26, 2023
d802709
Updated acceptance-test-config to remove commented out bypasses
pnilan Dec 26, 2023
c9ca9d0
Remove bypass for incremental tests
pnilan Dec 26, 2023
229154c
Remove errant catalog
pnilan Dec 26, 2023
2654ed0
Increments version number
pnilan Dec 26, 2023
fa276f6
Add `event` stream read test bypass as event data is updated daily
pnilan Dec 27, 2023
81def60
Merge branch 'pnilan/source-chargebee-new-streams' into pnilan/source…
pnilan Dec 28, 2023
96a8a06
Update manifest and future_state to represent correct cursor values
pnilan Dec 28, 2023
08a7015
Added `item_family` stream
pnilan Dec 29, 2023
43cb3c6
Added `differential_price` stream
pnilan Jan 2, 2024
ce1f53e
Updated formatting
pnilan Jan 3, 2024
92aade7
Updated `parent_period` field to reflect correct datatype
pnilan Jan 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading