Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of Transactions List Endpoint to existing Airbyte Connector #1

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

Harmaton
Copy link
Collaborator

What

This PR introduces a new endpoint to retrieve a list of transactions from the amazon seller api. It addresses the need for users to view their transaction history efficiently and provides proper documentation and configuration for the new feature.

How

  • Created a new Transaction List Schema in ListTransaction.json to handle GET requests for transaction lists
  • Implemented the stream logic in streams.py
  • Added appropriate configuration of the stream in source.py

@Harmaton Harmaton closed this Oct 17, 2024
@Harmaton Harmaton reopened this Oct 17, 2024
@zerobearing2
Copy link

@Harmaton I'm attempting to build the source-amazon-seller-partner connector locally, and test run it. The build works as expected, installed into local airbyte cluster, and set the connector version to dev, per the airbyte docs.

However, when attempting to retrieve the schema (creating a connection), it fails. See attached log dump of the exeception.
discover_schema-failure-bbef56cf-2d97-4a8d-920e-4e3535992e60.txt

Switching the connector version back to 4.4.4 (the latest) works. So either I'm doing something incorrectly, or there is a bug. Are you able to test run locally? If so, do you have instruction on getting it running properly?

FWIW: I rebased this branch with latest master from airbyte repo to ensure its latest.

/cc @revans

@@ -70,6 +70,7 @@
VendorSalesReports,
VendorTrafficReport,
XmlAllOrdersDataByOrderDataGeneral,
ListTransactions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to name this stream FinanceTransactions instead of ListTransactions? Feels like ListTransactions is a little ambiguous. Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind temporarily providing me with credentials so I can generate the exact schema I wish to get ? Its quite large and complex to do manually

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@zerobearing2 zerobearing2 Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Harmaton I can't provide any live credentials, sorry. I was just researching how to provide sandbox access. I'm unfamiliar with seller central sandbox, so not sure exactly how to grant access yet. However, it seems the sandbox just responds with a "mocked" response. The finance mocked response comes from github here: https://github.com/amzn/selling-partner-api-models/blob/main/models/finances-api-model/finances_2024-06-19.json

Is that something you could use? I will continue looking at how to provide temporary sandbox credentials and reply when I have something to share.

@Harmaton
Copy link
Collaborator Author

Harmaton commented Oct 21, 2024

Use the following Instruction to run the tests. I made a few changes to fix the schema issues causing the error. I decided to keep the prior naming to match the amazon documentation naming.

Here is the Spec.json file to help with config for local dev.

Thanks!

@zerobearing2
Copy link

Use the following Instruction to run the tests. I made a few changes to fix the schema issues causing the error. I decided to keep the prior naming to match the amazon documentation naming.

Here is the Spec.json file to help with config for local dev.

Thanks!

Awesome, will try again running locally and report back. Thanks!

@zerobearing2
Copy link

@Harmaton after rebuilding from latest, still seems to be having same issue. 🤔
discover_schema-failure-30a75cb5-2159-4f19-a2d1-7455d5382931.txt

@Harmaton
Copy link
Collaborator Author

I updated the schema in the code with the reference to the json schema in the documentation. Please run this test. I atleast expect a different error if any. Iam almost done securing my own credentials if I need to do any other test on my end. Thanks!

@zerobearing2
Copy link

@Harmaton I was able to get the schema to run now, however it doesn't look correct. Missing fields and why would pagination nextToken be included?
image

@Harmaton
Copy link
Collaborator Author

Harmaton commented Oct 23, 2024

I spotted the error and fixed it with the latest commit.

@zerobearing2
Copy link

Still only showing the transactions array instead of the actual transactions fields.
image

@Harmaton
Copy link
Collaborator Author

I would appreciate if you could please run the LAST test for me. If it does not sync then I will get to use my credentials by tomorrow. I am however confident this was the last iteration . @zerobearing2

…ields) and added the startfield required field (which caused the error)
@Harmaton
Copy link
Collaborator Author

@zerobearing2 Can you confirm that you can now see the field listings ?

@zerobearing2
Copy link

@zerobearing2 Can you confirm that you can now see the field listings ?

replied in slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants