Skip to content

Commit

Permalink
šŸ› Source Orb: update enrich ledger entry with event stream to pass tā€¦
Browse files Browse the repository at this point in the history
ā€¦imeframe bounds (#35897)

Co-authored-by: Kshitij Grover <[email protected]>
Co-authored-by: Arsh <[email protected]>
  • Loading branch information
3 people authored Mar 8, 2024
1 parent e77901d commit 4dc8c43
Show file tree
Hide file tree
Showing 14 changed files with 1,219 additions and 164 deletions.
38 changes: 0 additions & 38 deletions airbyte-integrations/connectors/source-orb/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ tests:
configured_catalog_path: "integration_tests/configured_catalog.json"
fail_on_extra_columns: false
empty_streams: ["credits_ledger_entries"]
- config_path: "secrets/config_credits_ledger_entries.json"
configured_catalog_path: "integration_tests/configured_catalog_credits.json"
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
# future_state_path: "integration_tests/abnormal_state.json"
- config_path: "secrets/config_credits_ledger_entries.json"
configured_catalog_path: "integration_tests/configured_catalog_credits.json"
future_state_path: "integration_tests/abnormal_state_credits.json"
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
"subscriptions": {
"created_at": "2122-01-01T00:00:00Z"
},
"credits_ledger_entries": {
"hHQF5BT5jtyj9r7V": {
"created_at": "2122-01-01T00:00:00Z"
}
},
"subscription_usage": {
"FDWRvxuBUiFfZech": {
"timeframe_start": "2122-01-01T00:00:00Z"
}
},
"invoices": {
"invoice_date": "2122-01-01T00:00:00Z"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"credits_ledger_entries": {
"hHQF5BT5jtyj9r7V": {
"created_at": "2122-01-01T00:00:00Z"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"streams": [
{
"stream": {
"name": "customers",
"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": "overwrite"
},
{
"stream": {
"name": "subscriptions",
Expand Down Expand Up @@ -47,34 +35,6 @@
},
"sync_mode": "incremental",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "credits_ledger_entries",
"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": "overwrite"
},
{
"stream": {
"name": "subscription_usage",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["timeframe_start"],
"source_defined_primary_key": [
["subscription_id"],
["billable_metric_id"],
["timeframe_start"]
]
},
"sync_mode": "incremental",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"streams": [
{
"stream": {
"name": "credits_ledger_entries",
"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": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
{
"customers": {
"created_at": "2022-01-01T00:00:00Z"
[
{
"streamDescriptor": {
"name": "credits_ledger_entries"
},
"streamState": {
"hHQF5BT5jtyj9r7V": {
"created_at": "2022-02-03T18:59:01+00:00"
}
}
},
"plans": {
"created_at": "2022-01-01T00:00:00Z"
{
"streamDescriptor": {
"name": "subscription_usage"
},
"streamState": {
"FDWRvxuBUiFfZech": {
"timeframe_start": "2022-02-02T00:00:00+00:00"
}
}
},
"subscriptions": {
"created_at": "2022-01-01T00:00:00Z"
{
"streamDescriptor": {
"name": "plans"
},
"streamState": {
"created_at": "2022-02-02T10:03:57+00:00"
}
},
"credits_ledger_entries": {
"7c507794-7413-4467-8f1d-d3785a6c65ca": {
"created_at": "2022-01-01T00:00:00Z"
{
"streamDescriptor": {
"name": "invoices"
},
"streamState": {
"invoice_date": "2022-03-01T08:00:00+00:00"
}
},
"subscription_usage": {
"someId": {
"timeframe_start": "2022-01-01T00:00:00Z"
{
"streamDescriptor": {
"name": "customers"
},
"streamState": {
"created_at": "2022-02-02T10:01:15+00:00"
}
},
"invoices": {
"invoice_date": "2022-01-01T00:00:00Z"
{
"streamDescriptor": {
"name": "subscriptions"
},
"streamState": {
"created_at": "2022-02-02T10:04:09+00:00"
}
}
}
]
4 changes: 3 additions & 1 deletion airbyte-integrations/connectors/source-orb/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
data:
connectorBuildOptions:
baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9
connectorSubtype: api
connectorType: source
definitionId: 7f0455fb-4518-4ec0-b7a3-d808bf8081cc
dockerImageTag: 1.1.0
dockerImageTag: 1.1.1
dockerRepository: airbyte/source-orb
githubIssueLabel: source-orb
icon: orb.svg
Expand Down
Loading

0 comments on commit 4dc8c43

Please sign in to comment.