Skip to content

singer-io/tap-quickbase

Repository files navigation

tap-quickbase

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

This tap:

Streams

apps

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

events

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

roles

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

app_tables

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

tables

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

table_relationships

  • Primary keys: ['id', 'tableId']
  • Replication strategy: FULL_TABLE

table_reports

  • Primary keys: ['id', 'tableId']
  • Replication strategy: FULL_TABLE

reports

  • Primary keys: ['id']
  • Replication strategy: FULL_TABLE

fields

  • Primary keys: ['id', 'tableId']
  • Replication strategy: FULL_TABLE

fields_usage

  • Primary keys: ['id', 'tableId']
  • Replication strategy: FULL_TABLE

Authentication

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
    > python setup.py install
    OR
    > cd .../tap-quickbase
    > pip install -e .
  2. Dependent libraries. The following dependent libraries were installed.

    > pip install singer-python
    > pip install target-stitch
    > pip install target-json
    
  3. Create your tap's config.json file. The tap config file for this tap should include these entries:

    • qb_user_token (string, required): Quickbase API authentication token
    • qb_url (string, required): Quickbase URL including protocol and /db/ path (e.g., https://your-realm.quickbase.com/db/)
    • qb_appid (string, required): Quickbase application ID
    • start_date (string, required): The default value to use if no bookmark exists for an endpoint (rfc3339 date string)
    • page_size (integer, optional): Number of records to fetch per page. Default is 100.
    • request_timeout (integer, optional): Max time for which request should wait to get a response. Default is 300 seconds.
    {
        "qb_user_token": "your_quickbase_user_token",
        "qb_url": "https://your-realm.quickbase.com/db/",
        "qb_appid": "your_app_id",
        "start_date": "2023-01-01T00:00:00Z",
        "page_size": 100,
        "request_timeout": 300
    }

    Optionally, also create a state.json file. currently_syncing is an optional attribute used for identifying the last object to be synced in case the job is interrupted mid-stream. The next run would begin where the last job left off.

    {
        "currently_syncing": "tables",
        "bookmarks": {
            "apps": "2023-01-15T10:30:00.000000Z",
            "events": "2023-01-15T11:45:00.000000Z",
            "tables": "2023-01-15T12:00:00.000000Z"
        }
    }
  4. Run the Tap in Discovery Mode This creates a catalog.json for selecting objects/fields to integrate:

    tap-quickbase --config config.json --discover > catalog.json

    See the Singer docs on discovery mode here.

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

    For Sync mode:

    > tap-quickbase --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-quickbase --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-quickbase --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
  6. Test the Tap While developing the quickbase tap, the following utilities were run in accordance with Singer.io best practices: Pylint to improve code quality:

    > pylint tap_quickbase -d missing-docstring -d logging-format-interpolation -d too-many-locals -d too-many-arguments

    Pylint test resulted in the following score:

    Your code has been rated at 9.67/10

    To check the tap and verify working:

    > tap_quickbase --config tap_config.json --catalog catalog.json | singer-check-tap > state.json
    > tail -1 state.json > state.json.tmp && mv state.json.tmp state.json

    Unit Tests

    Unit tests may be run with the following.

    python -m pytest --verbose
    

    Note, you may need to install test dependencies.

    pip install -e .'[dev]'
    

Copyright © 2019 Stitch

About

Singer.io tap for Quick Base API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9

Languages