Skip to content

singer-io/tap-amazon-sp

Repository files navigation

tap-amazon-sp

This is a Singer tap that produces JSON-formatted data following the Singer spec.

This tap:

Authentication

This guide walks through the process necessary for generating the required credentials for authenticating with the API.

Config

The tap accepts the following config items:

field type required description
refresh_token string yes Auth
client_id string yes Auth
client_secret string yes Auth
aws_access_key string yes IAM Policies and Entities
aws_secret_key string yes IAM Policies and Entities
role_arn string yes IAM Policies and Entities
start_date string yes ISO-8601 Example: "2021-08-03" or "2021-08-03T23:29:19+00:00"
marketplaces str no Space delimited string of Marketplace Country Code values. Default is ["US"].
sales_data_granularity string no Granularity for sales stream for sales aggregation. Default is "DAY".

Quick Start

  1. Install

Clone this repository, and then install using setup.py. We recommend using a virtualenv:

$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -e .
  1. Create your tap's config.json file. Look at this table for format and required fields.

Run the Tap in Discovery Mode This creates a catalog.json for selecting objects/fields to integrate:

tap-amazon-sp --config config.json --discover > catalog.json

See the Singer docs on discovery mode here.

  1. Run the Tap in Sync Mode (with catalog) and write out to state file

For Sync mode:

$ tap-amazon-sp --config tap_config.json --catalog catalog.json >> state.json
$ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

To load to json files to verify outputs:

$ tap-amazon-sp --config tap_config.json --catalog catalog.json | target-json >> state.json
$ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

To pseudo-load to Stitch Import API with dry run:

$ tap-amazon-sp --config tap_config.json --catalog catalog.json | target-stitch --config target_config.json --dry-run >> state.json
$ tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

Copyright © 2018 Stitch

About

Singer tap for the Amazon Selling Partner API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages