Skip to content

angelcam/tap-satismeter

Repository files navigation

tap-satismeter

tap-satismeter is a Singer tap for extracting survey data from the SatisMeter API.

Built with the Meltano Tap SDK for Singer Taps.

Features

  • Extracts surveys and survey responses from SatisMeter
  • Supports incremental replication for responses based on created timestamp
  • Cursor-based pagination for efficient data extraction
  • Configurable start date for initial sync

Supported Streams

Stream Replication Parent Description
surveys Full - List of all surveys (campaigns) in the project
responses Incremental - Survey responses with user info and metadata
answers Full responses Individual answers extracted from each response

Installation

# Clone the repository
git clone https://github.com/angelcam/tap-satismeter.git
cd tap-satismeter

# Install dependencies
uv sync

Configuration

Required Settings

Setting Description
api_key SatisMeter API Key
project_id The SatisMeter project ID to fetch data from

Optional Settings

Setting Description Default
start_date ISO-8601 date for initial sync 30 days ago

Getting Credentials

API Key and Project ID can be obtained from:

  1. 1Password: Look for "SatisMeter" entry
  2. SatisMeter Dashboard: Navigate to Settings > Integrations > API

Example Configuration

Option 1: Using environment variables (recommended)

cp .env.example .env
# Edit .env with your credentials
export TAP_SATISMETER_API_KEY=your_api_key_here
export TAP_SATISMETER_PROJECT_ID=your_project_id_here
export TAP_SATISMETER_START_DATE=2024-01-01T00:00:00Z

Option 2: Using config.json

cp config.json.example config.json
# Edit config.json with your credentials
{
  "api_key": "your_api_key_here",
  "project_id": "your_project_id_here",
  "start_date": "2024-01-01T00:00:00Z"
}

Usage

Running the Tap Directly

# Show version
uv run tap-satismeter --version

# Show available settings
uv run tap-satismeter --about

# Discover available streams (using env vars)
uv run tap-satismeter --config=ENV --discover

# Discover available streams (using config.json)
uv run tap-satismeter --config config.json --discover

# Run a sync
uv run tap-satismeter --config=ENV

# Run with state for incremental sync
uv run tap-satismeter --config=ENV --state state.json

Running with Meltano

# Install Meltano
uv tool install meltano

# Install the tap
meltano install

# Configure the tap
meltano config tap-satismeter set api_key your_api_key_here
meltano config tap-satismeter set project_id your_project_id_here

# Run the tap
meltano run tap-satismeter target-jsonl

Incremental Replication

The responses stream supports incremental replication using the created field. On subsequent runs with state, only new responses since the last sync will be extracted.

Important: The SatisMeter API defaults to returning only the last 30 days of data. To capture full history, always specify a start_date in your configuration.

Development

Setup

# Clone the repository
git clone https://github.com/angelcam/tap-satismeter.git
cd tap-satismeter

# Install all dependencies (including dev)
uv sync --all-groups

Running Tests

# Run all tests
uv run pytest

# Run with verbose output
uv run pytest -v

# Run with coverage
uv run pytest --cov=tap_satismeter

Type Checking and Linting

# Type checking
uv run mypy tap_satismeter

# Linting
uv run ruff check tap_satismeter

API Reference

This tap interacts with the following SatisMeter API endpoints:

  • GET /projects/{projectId}/campaigns - List surveys
  • GET /projects/{projectId}/responses - Get survey responses

For full API documentation, see SatisMeter API Docs.

License

Apache 2.0 - See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages