Giter VIP home page Giter VIP logo

tap-bigcommerce's Introduction

tap-bigcommerce

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

Quick Start

  1. Set up a virtual environment and install this tap. See the Singer-io Getting Started Guide for help.

  2. Create the config.json file.

    {
      "client_id": "xxxxxxxxx",
      "access_token": "xxxxxxxxx",
      "store_hash": "xxxxxxxxx",
      "start_date": "2017-01-01T00:00:00Z"
    }
    
  3. Run the tap in Discovery Mode to create the Catalog.

    $ tap-bigcommerce --config config.json --discover > catalog.json
    
  4. Select the fields you wish to sync. See Field Selection below for more information.

  5. Run the tap in Sync Mode.

    $ tap-bigcommerce --config config.json --catalog catalog.json
    

About this tap

The Config

The config file is used to authenticate into BigCommerce. The Legacy API credentials not accepted.

  • Orders stream requires read permission on Orders
  • Customers stream requires read permission on Customers
  • Products stream requires read permission on Products
  • Coupons stream requires read permission on Marketing

start_date is used for resources that can be filtered by date_modified - orders, customers and products

Discovery mode

This command returns a JSON that describes the schema of each table.

$ tap-bigcommerce --config config.json --discover

To save this to catalog.json:

$ tap-bigcommerce --config config.json --discover > catalog.json

Field selection

You can tell the tap to extract specific fields by editing catalog.json to make selections (or use the Singer Discover utility. You can change metadata for specific fields or tables and change the "selected" field value to false.

"metadata": [
  {
    "breadcrumb": [],
    "metadata": {
      "table-key-properties": [
        "id"
      ],
      "forced-replication-method": "INCREMENTAL",
      "selected-by-default": true,
      "valid-replication-keys": [
        "date_modified"
      ]
    }
  },
  {
    "breadcrumb": [
      "properties",
      "id"
    ],
    "metadata": {
      "inclusion": "automatic",
      "selected": true
    }
  },
  ...

Sync Mode

With an annotated catalog.json, the tap can be invoked in sync mode:

$ tap-bigcommerce --config config.json --catalog catalog.json

Messages are written to standard output following the Singer specification. The resultant stream of JSON data can be consumed by a Singer target.

Replication Methods and State File

Use the following command to pipe the tap output into your Singer target of choice and update the state file in one go.

tap-bigcommerce --config config.json --catalog catalog.json --state state.json | target > state.json.tmp && tail -1 state.json.tmp > state.json

Copyright © 2019 Stitch

tap-bigcommerce's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.