-
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.
Add SubscriptionUsage stream to Orb Source (#21951)
* wip * mvp * big rework to make incremental possibly work * incremental might be working * add external_customer_id to subscriptions stream * keep state indexed by subscription_id * add a source defined primary key * move super call after assignments * start work on integration tests * format and more test setup * tests and cleanup * fix yield from * format fixes * fix type of new subscriptions property * add subscription with actual usage for integration test config * fix start date parsing and use correct keys in integration test * update docs * bump version from 0.1.4 to 0.1.5 and update changelog * make start_date a required field and set version 0.2.0 instead of 0.1.5 * major version bump from 0.1.4 to 1.0.0 to reflect backwards-incompatible change making start_date a required field * pass start_date in unit test * add sample start_date * start_date already converted * add start_date to sample_config * remove accidental char * auto-bump connector version --------- Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
- Loading branch information
1 parent
3297e9e
commit 9709adf
Showing
16 changed files
with
678 additions
and
16 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
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
3 changes: 2 additions & 1 deletion
3
airbyte-integrations/connectors/source-orb/integration_tests/sample_config.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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"api_key": "<sample_api_key>" | ||
"api_key": "<sample_api_key>", | ||
"start_date": "2023-01-25T00:00:00Z" | ||
} |
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
34 changes: 34 additions & 0 deletions
34
airbyte-integrations/connectors/source-orb/source_orb/schemas/subscription_usage.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,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": ["null", "object"], | ||
"properties": { | ||
"quantity": { | ||
"type": "number" | ||
}, | ||
"timeframe_start": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"timeframe_end": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"billable_metric_name": { | ||
"type": "string" | ||
}, | ||
"billable_metric_id": { | ||
"type": "string" | ||
}, | ||
"subscription_id": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"quantity", | ||
"timeframe_start", | ||
"timeframe_end", | ||
"billable_metric_name", | ||
"billable_metric_id", | ||
"subscription_id" | ||
] | ||
} |
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.