Skip to content

Commit

Permalink
Source Amazon Seller Partner: add all remaining brand analytics repor…
Browse files Browse the repository at this point in the history
…t streams (#9312)

* Add all brand analytic streams

* Parametrize results key

* Update schemas

* Parametrize result_key

* Add missing result_key

* Remove duplicate

* Update configured catalogs

* Cleanup

* Add configured catalogs for brand analytics

* Run gradlew format

* Update documentation
  • Loading branch information
monai authored Jan 11, 2022
1 parent 5643c17 commit 6ba5146
Show file tree
Hide file tree
Showing 14 changed files with 398 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ tests:
# "GET_VENDOR_INVENTORY_HEALTH_AND_PLANNING_REPORT",
# "VendorDirectFulfillmentShipping",
# ]
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_brand_analytics_alternate_purchase.json"
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_brand_analytics_item_comparison.json"
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_brand_analytics_market_basket.json"
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_brand_analytics_repeat_purchase.json.json"
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_brand_analytics_search_terms.json"
# TODO: uncomment when Orders (or any other incremental) stream is filled with data
# incremental:
# - config_path: "secrets/config.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["Date"]
},
{
"stream": {
"name": "GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"streams": [
{
"stream": {
"name": "GET_BRAND_ANALYTICS_ALTERNATE_PURCHASE_REPORT",
"json_schema": {
"title": "Brand Analytics Alternate Purchase Reports",
"description": "Brand Analytics Alternate Purchase Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"purchasedAsin": {
"type": ["null", "string"]
},
"purchasedRank": {
"type": ["null", "integer"]
},
"purchasedPct": {
"type": ["null", "number"]
}
}
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"streams": [
{
"stream": {
"name": "GET_BRAND_ANALYTICS_ITEM_COMPARISON_REPORT",
"json_schema": {
"title": "Brand Analytics Item Comparison Reports",
"description": "Brand Analytics Item Comparison Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"comparedAsin": {
"type": ["null", "string"]
},
"comparedRank": {
"type": ["null", "integer"]
},
"comparedPct": {
"type": ["null", "number"]
}
}
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"streams": [
{
"stream": {
"name": "GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT",
"json_schema": {
"title": "Brand Analytics Market Basket Reports",
"description": "Brand Analytics Market Basket Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"purchasedWithAsin": {
"type": ["null", "string"]
},
"purchasedWithRank": {
"type": ["null", "integer"]
},
"combinationPct": {
"type": ["null", "number"]
}
}
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"streams": [
{
"stream": {
"name": "GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT",
"json_schema": {
"title": "Brand Analytics Repeat Purchase Reports",
"description": "Brand Analytics Repeat Purchase Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"orders": {
"type": ["null", "integer"]
},
"uniqueCustomers": {
"type": ["null", "integer"]
},
"repeatCustomersPctTotal": {
"type": ["null", "number"]
},
"repeatPurchaseRevenue": {
"type": "object",
"properties": {
"amount": {
"type": ["null", "number"]
},
"currencyCode": {
"type": ["null", "string"]
}
}
},
"repeatPurchaseRevenuePctTotal": {
"type": ["null", "number"]
}
}
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"streams": [
{
"stream": {
"name": "GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT",
"json_schema": {
"title": "Brand Analytics Search Terms Reports",
"description": "Brand Analytics Search Terms Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"departmentName": {
"type": ["null", "string"]
},
"searchTerm": {
"type": ["null", "string"]
},
"searchFrequencyRank": {
"type": ["null", "number"]
},
"clickedAsin": {
"type": ["null", "string"]
},
"clickShareRank": {
"type": ["null", "number"]
},
"clickShare": {
"type": ["null", "number"]
},
"conversionShare": {
"type": ["null", "number"]
}
}
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "Brand Analytics Alternate Purchase Reports",
"description": "Brand Analytics Alternate Purchase Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"purchasedAsin": {
"type": ["null", "string"]
},
"purchasedRank": {
"type": ["null", "integer"]
},
"purchasedPct": {
"type": ["null", "number"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "Brand Analytics Item Comparison Reports",
"description": "Brand Analytics Item Comparison Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"comparedAsin": {
"type": ["null", "string"]
},
"comparedRank": {
"type": ["null", "integer"]
},
"comparedPct": {
"type": ["null", "number"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "Brand Analytics Market Basket Reports",
"description": "Brand Analytics Market Basket Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"purchasedWithAsin": {
"type": ["null", "string"]
},
"purchasedWithRank": {
"type": ["null", "integer"]
},
"combinationPct": {
"type": ["null", "number"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"title": "Brand Analytics Repeat Purchase Reports",
"description": "Brand Analytics Repeat Purchase Reports",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"orders": {
"type": ["null", "integer"]
},
"uniqueCustomers": {
"type": ["null", "integer"]
},
"repeatCustomersPctTotal": {
"type": ["null", "number"]
},
"repeatPurchaseRevenue": {
"type": "object",
"properties": {
"amount": {
"type": ["null", "number"]
},
"currencyCode": {
"type": ["null", "string"]
}
}
},
"repeatPurchaseRevenuePctTotal": {
"type": ["null", "number"]
}
}
}
Loading

0 comments on commit 6ba5146

Please sign in to comment.