Skip to content

Commit

Permalink
[PDD-481] Create new stream and and new columns (#38)
Browse files Browse the repository at this point in the history
* feat(tap-suiteql): Create new stream billingaccount and add new columns to SubscriptionPriceInterval stream

* fix(tap-suiteql): Adjust order of imports
  • Loading branch information
Marcos314 authored Jul 19, 2023
1 parent fdce47d commit 1f11952
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ We extract the following entities with its respective method
* MonthlyRecurringRevenue -> static
* Charge -> dynamically
* CustomRecordGpyChangeOrderClassific -> dynamically
* BilligAccount -> dynamically

### SDK Dev Guide

Expand Down
12 changes: 12 additions & 0 deletions tap_suiteql/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class SubscriptionPriceIntervalStream(suiteqlStream):
th.Property("startoffsetvalue", th.StringType),
th.Property("status", th.StringType),
th.Property("subscription", th.StringType),
th.Property("discount", th.StringType),
th.Property("discountamount", th.StringType),
th.Property("discountpercent", th.StringType),
).to_dict()


Expand Down Expand Up @@ -293,3 +296,12 @@ class CustomRecordGpyChangeOrderClassificStream(suiteqlStream):
primary_keys = ["id"]
skip_attributes = ["links"]
replication_key = "lastmodified"


class BilligAccountStream(suiteqlStream):
name = "billingaccount"
path = "/query/v1/suiteql"
metadata_path = "/record/v1/metadata-catalog/billingaccount"
primary_keys = ["id"]
skip_attributes = ["links"]
replication_key = "lastmodifieddate"
2 changes: 2 additions & 0 deletions tap_suiteql/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from tap_suiteql.query_builder import QueryBuilder # JSON schema typing helpers
from tap_suiteql.schema_builder import SchemaBuilder
from tap_suiteql.streams import (
BilligAccountStream,
ChangeOrderLineStream,
ChargeStream,
CustomerPaymentStream,
Expand Down Expand Up @@ -44,6 +45,7 @@
"SubscriptionChangeOrder": SubscriptionChangeOrderStream,
"Item": ItemStream,
"MonthlyRecurringRevenue": MonthlyRecurringRevenueStream,
"BilligAccount": BilligAccountStream,
}


Expand Down

0 comments on commit 1f11952

Please sign in to comment.