Skip to main content

Singer tap for StackExchange, built with the Meltano SDK for Singer Taps.

Project description

tap-stackexchange

Test

Singer tap for the StackExchange API.

Built with the Meltano SDK for Singer Taps and Targets.

Capabilities

  • sync
  • catalog
  • state
  • discover

Settings

Setting Required Default Description
key False None Pass this to receive a higher request quota
site False stackoverflow.com StackExchange site
tags False None Question tags
start_date False None The earliest record date to sync

A full list of supported settings and capabilities is available by running: tap-stackexchange --about

Custom filter

The StackExchange API supports a number of custom filters that can be used to include or exclude certain fields from the response objects. This application has a baked-in filter with the following parameters:

  • include

    Parameter Description
    question.comment_count The number of comments on the question
    tag.last_activity_date The date of the last activity on the tag
  • unsafe=false

Update the baked-in filter

To update the baked-in filter, edit the FILTER_ID constant in tap_stackexchange/tap.py.

To generate a new filter, use the Try It button on the StackExchange API documentation, using the baked-in filter as the base parameter.

Use a custom filter

To use a custom filter, set the filter setting to the filter ID. Note that if you use a custom filter, you will need to use a custom catalog that includes the fields you want to sync. That is you will need to

  1. Write the default catalog to a file: tap-stackexchange --discover > catalog.json
  2. Edit the catalog file to include the fields not included by the default API filter
  3. Run the tap with the custom catalog: tap-stackexchange --config config.json --catalog catalog.json

Installation

pipx install git+https://github.com/edgarrmondragon/tap-stackexchange.git

Source Authentication and Authorization

Register a new application on Stack Apps and copy the generated key.

Usage

You can easily run tap-stackexchange by itself or in a pipeline using Meltano.

Executing the Tap Directly

tap-stackexchange --version
tap-stackexchange --help
tap-stackexchange --config CONFIG --discover > ./catalog.json

Initialize your Development Environment

pipx install poetry
poetry install

Testing with Meltano

Note: This tap will work in any Singer environment and does not require Meltano. Examples here are for convenience and to streamline end-to-end orchestration scenarios.

Your project comes with a custom meltano.yml project file already created. Open the meltano.yml and follow any "TODO" items listed in the file.

Next, install Meltano (if you haven't already) and any needed plugins:

# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-stackexchange
meltano install

Now you can test and orchestrate using Meltano:

# Test invocation:
meltano invoke tap-stackexchange --version

# OR run a test `elt` pipeline:
meltano elt tap-stackexchange target-sqlite --job_id=stackexchange-sqlite

# Runtime configuration
TAP_STACKEXCHANGE__LOAD_SCHEMA=dragon_ball_gt \
TAP_STACKEXCHANGE_SITE=anime \
TAP_STACKEXCHANGE_TAGS='["dragon-ball-gt"]' \
meltano elt tap-stackexchange target-sqlite

SDK Dev Guide

See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tap_stackexchange-0.0.12.tar.gz (93.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tap_stackexchange-0.0.12-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file tap_stackexchange-0.0.12.tar.gz.

File metadata

  • Download URL: tap_stackexchange-0.0.12.tar.gz
  • Upload date:
  • Size: 93.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tap_stackexchange-0.0.12.tar.gz
Algorithm Hash digest
SHA256 cad0bbcdcff0fc0e34bb499b9051708f2dfec4ccf0164217f86c9156f01776ec
MD5 8ef50c2be5375eaa35961c892f0088b9
BLAKE2b-256 948ba3014f6cab713550803dd373d7a98d776719b18f4a1ce289ec2ab29a9229

See more details on using hashes here.

Provenance

The following attestation bundles were made for tap_stackexchange-0.0.12.tar.gz:

Publisher: build.yaml on MeltanoLabs/tap-stackexchange

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tap_stackexchange-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for tap_stackexchange-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e00fa5f92b78f48b759f5eae17421a6daa87f4fa0d6a7ed13789303394b7f1f9
MD5 04d37ad5b5544334b69594d435d6bf58
BLAKE2b-256 bc29768f4a4035e2fa0c121257a700fa4592eabdbf08acb6d225574bb8f3394d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tap_stackexchange-0.0.12-py3-none-any.whl:

Publisher: build.yaml on MeltanoLabs/tap-stackexchange

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page