Skip to content

Commit 2c3e241

Browse files
Harshith/test pr 8179 (#8836)
* fix: formatting * chore: changed spec * fix: spec update for snowflake destination
1 parent 21ff8a2 commit 2c3e241

File tree

6 files changed

+48
-34
lines changed

6 files changed

+48
-34
lines changed

airbyte-config/init/src/main/resources/seed/destination_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3457,7 +3457,7 @@
34573457
supported_destination_sync_modes:
34583458
- "overwrite"
34593459
- "append"
3460-
- dockerImage: "airbyte/destination-snowflake:0.3.20"
3460+
- dockerImage: "airbyte/destination-snowflake:0.3.21"
34613461
spec:
34623462
documentationUrl: "https://docs.airbyte.io/integrations/destinations/snowflake"
34633463
connectionSpecification:

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@
179179
- "30"
180180
- "365"
181181
type: "integer"
182+
report_options:
183+
title: "Report Options"
184+
description: "Additional information passed to reports. This varies by report\
185+
\ type. Must be a valid json string."
186+
examples:
187+
- "{\"GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT\": {\"reportPeriod\": \"WEEK\"\
188+
}}"
189+
- "{\"GET_SOME_REPORT\": {\"custom\": \"true\"}}"
190+
type: "string"
182191
refresh_token:
183192
title: "Refresh Token"
184193
description: "The Refresh Token obtained via OAuth flow authorization."
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"title": "Brand Analytics Search Terms Reports",
3-
"description": "Brand Analytics Search Terms Reports",
4-
"type": "object",
5-
"$schema": "http://json-schema.org/draft-07/schema#",
6-
"properties": {
7-
"departmentName": {
8-
"type": ["null", "string"]
9-
},
10-
"searchTerm": {
11-
"type": ["null", "string"]
12-
},
13-
"searchFrequencyRank": {
14-
"type": ["null", "number"]
15-
},
16-
"clickedAsin": {
17-
"type": ["null", "string"]
18-
},
19-
"clickShareRank": {
20-
"type": ["null", "number"]
21-
},
22-
"clickShare": {
23-
"type": ["null", "number"]
24-
},
25-
"conversionShare": {
26-
"type": ["null", "number"]
27-
}
2+
"title": "Brand Analytics Search Terms Reports",
3+
"description": "Brand Analytics Search Terms Reports",
4+
"type": "object",
5+
"$schema": "http://json-schema.org/draft-07/schema#",
6+
"properties": {
7+
"departmentName": {
8+
"type": ["null", "string"]
9+
},
10+
"searchTerm": {
11+
"type": ["null", "string"]
12+
},
13+
"searchFrequencyRank": {
14+
"type": ["null", "number"]
15+
},
16+
"clickedAsin": {
17+
"type": ["null", "string"]
18+
},
19+
"clickShareRank": {
20+
"type": ["null", "number"]
21+
},
22+
"clickShare": {
23+
"type": ["null", "number"]
24+
},
25+
"conversionShare": {
26+
"type": ["null", "number"]
2827
}
2928
}
29+
}

airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from source_amazon_seller_partner.auth import AWSAuthenticator, AWSSignature
1616
from source_amazon_seller_partner.constants import AWSEnvironment, AWSRegion, get_marketplaces
1717
from source_amazon_seller_partner.streams import (
18+
BrandAnalyticsSearchTermsReports,
1819
FbaInventoryReports,
1920
FbaOrdersReports,
2021
FbaShipmentsReports,
@@ -26,7 +27,6 @@
2627
SellerFeedbackReports,
2728
VendorDirectFulfillmentShipping,
2829
VendorInventoryHealthReports,
29-
BrandAnalyticsSearchTermsReports,
3030
)
3131

3232

airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/spec.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
"report_options": {
2323
"title": "Report Options",
2424
"description": "Additional information passed to reports. This varies by report type. Must be a valid json string.",
25-
"examples":["{\"GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT\": {\"reportPeriod\": \"WEEK\"}}", "{\"GET_SOME_REPORT\": {\"custom\": \"true\"}}"],
25+
"examples": [
26+
"{\"GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT\": {\"reportPeriod\": \"WEEK\"}}",
27+
"{\"GET_SOME_REPORT\": {\"custom\": \"true\"}}"
28+
],
2629
"type": "string"
2730
},
2831
"refresh_token": {

airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
DATE_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
3737

38+
3839
class AmazonSPStream(HttpStream, ABC):
3940
data_field = "payload"
4041

@@ -386,6 +387,7 @@ class FbaShipmentsReports(ReportsAmazonSPStream):
386387
class VendorInventoryHealthReports(ReportsAmazonSPStream):
387388
name = "GET_VENDOR_INVENTORY_HEALTH_AND_PLANNING_REPORT"
388389

390+
389391
class BrandAnalyticsSearchTermsReports(ReportsAmazonSPStream):
390392
"""
391393
Field definitions: https://sellercentral.amazon.co.uk/help/hub/reference/G5NXWNY8HUD3VDCW
@@ -405,12 +407,12 @@ def _report_data(
405407
stream_slice: Mapping[str, Any] = None,
406408
stream_state: Mapping[str, Any] = None,
407409
) -> Mapping[str, Any]:
408-
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
409-
options = self.report_options()
410-
if options is not None:
411-
data.update(self._augmented_data(options))
410+
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
411+
options = self.report_options()
412+
if options is not None:
413+
data.update(self._augmented_data(options))
412414

413-
return data
415+
return data
414416

415417
@staticmethod
416418
def _augmented_data(report_options) -> Mapping[str, Any]:

0 commit comments

Comments
 (0)