-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 Source Amazon Seller Partner: enable stream attribute customisation…
… from Source configuration (#22503) * feat: add new field and fix tests to accept it * renamed to advanced_stream_options * add implementation with test * feat: add new field and fix tests to accept it * renamed to advanced_stream_options * add implementation with test * update specs * fix lint errors * increment Dockerfile version * Add missing field for spec validation * add doc and update mtdt --------- Co-authored-by: sh4sh <6833405+sh4sh@users.noreply.github.com> Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com> Co-authored-by: Sajarin <sajarindider@gmail.com> Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
- Loading branch information
1 parent
53d66be
commit 4e86231
Showing
12 changed files
with
76 additions
and
2 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
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
33 changes: 33 additions & 0 deletions
33
...nnectors/source-amazon-seller-partner/unit_tests/test_reports_stream_sales_and_traffic.py
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,33 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
from source_amazon_seller_partner.auth import AWSSignature | ||
from source_amazon_seller_partner.streams import SellerAnalyticsSalesAndTrafficReports | ||
|
||
START_DATE_1 = "2023-02-05T00:00:00Z" | ||
END_DATE_1 = "2023-02-07T00:00:00Z" | ||
|
||
|
||
def test_stream_uses_advanced_options(): | ||
aws_signature = AWSSignature( | ||
service="execute-api", | ||
aws_access_key_id="AccessKeyId", | ||
aws_secret_access_key="SecretAccessKey", | ||
aws_session_token="SessionToken", | ||
region="US", | ||
) | ||
stream = SellerAnalyticsSalesAndTrafficReports( | ||
url_base="https://test.url", | ||
aws_signature=aws_signature, | ||
replication_start_date=START_DATE_1, | ||
replication_end_date=END_DATE_1, | ||
marketplace_id="id", | ||
authenticator=None, | ||
period_in_days=0, | ||
report_options=None, | ||
advanced_stream_options='{"GET_SALES_AND_TRAFFIC_REPORT":{"availability_sla_days": 3}}', | ||
max_wait_seconds=500, | ||
) | ||
|
||
assert stream.availability_sla_days == 3 |
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