Skip to content

Singer

Run any Singer tap and query its streams as typed DuckDB tables

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/singer/index.md to help me query Singer with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Explore the data a Singer tap can extract

Install and configure the tap-github Singer tap before running discovery.

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT stream, key_properties, replication_method,
  len(columns) AS column_count
FROM singer.main.discover('tap-github')
ORDER BY stream

Quick start

Choose where to run Singer, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'singer' AS singer (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-singer-worker'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

singer credentials

Config JSON for a Singer tap, written to a private temporary file while the tap runs.

Get these credentials →
secret.sql
CREATE SECRET singer (
    TYPE singer,
    config '<SINGER_CONFIG>'  -- required, secret
);
Credential fields and requirements →

4. Run a query

query.sql
SELECT stream, key_properties, replication_method,
  len(columns) AS column_count
FROM singer.main.discover('tap-github')
ORDER BY stream
More example queries →
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'singer' AS singer (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-singer-worker'
);

Overview

Run any Singer tap (the ~600 extractors on Meltano Hub) from DuckDB and query its streams as typed tables, or read saved Singer JSONL output.

ATTACH options

tap
Tap executable name, e.g. 'tap-csv'. With catalog, every stream becomes a table.VARCHAR
catalog
Singer catalog for the tap: a file path or the catalog JSON itself.VARCHAR
pip_url
pip requirement the tap is installed from into an isolated cached environment.VARCHAR
executable
Path to an already installed tap executable; skips installation.VARCHAR
python
Python version for the tap's environment, e.g. '3.12'.VARCHAR
secret_name
Name of the singer secret with the tap config; empty uses the 'singer://<tap>' scope.VARCHAR
timeout_seconds
Stop a tap that prints nothing for this many seconds; 0 waits forever.BIGINT

Catalog

Everything singer exposes once attached — read straight from the worker's released build.

singer 1 schema
main 8 functions

Functions that run Singer taps and read Singer output; attached tap streams appear here as tables.

Schema examples (9)
Examples (9)

Which streams tap-github offers and how each replicates

SELECT stream, key_properties, replication_method,
  len(columns) AS column_count
FROM singer.main.discover('tap-github')
ORDER BY stream;

How many streams tap-github discovers

SELECT streams, json_keys(catalog) AS keys
FROM singer.main.catalog('tap-github');

The first ten customers from a CSV file read by MeltanoLabs tap-csv

SELECT id, name
FROM singer.main.read_stream('tap-csv', 'customers', pip_url := 'git+https://github.com/MeltanoLabs/tap-csv.git')
ORDER BY id
LIMIT 10;

Count the commits tap-github syncs, starting from an empty state

SELECT count(*) AS commits
FROM singer.main.read_stream('tap-github', 'commits', state := '{"bookmarks": {}}');
5 more examples

Sync one tap-github stream and keep the bookmarks to resume from

SELECT records, final_state->'$.bookmarks' AS bookmarks
FROM singer.main.final_state('tap-github', stream := 'issues');

Message counts by type for one tap-github stream

SELECT type, count(*) AS n
FROM singer.main.messages('tap-github', stream := 'issues')
GROUP BY type
ORDER BY type;

Message counts by type in saved Singer output

SELECT type, count(*) AS n
FROM singer.main.read_messages('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl')
GROUP BY type
ORDER BY type;

Count the events records in saved Singer output

SELECT count(*) AS events
FROM singer.main.read_records('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl', 'events');

An object with declared properties becomes a STRUCT

SELECT singer.main.json_schema_type('{"type": "object", "properties": {"id": {"type": "integer"}}}') AS duckdb_type;
Scalar functions
json_schema_type (schema VARCHAR) 2 examples

The DuckDB type this worker maps a Singer JSON Schema to

Arguments
schema VARCHAR
A JSON Schema as JSON text; NULL in, NULL out.
ReturnsVARCHAR
Examples (2)

An object with declared properties becomes a STRUCT

SELECT singer.main.json_schema_type('{"type": "object", "properties": {"id": {"type": "integer"}}}') AS duckdb_type;
SELECT singer.main.json_schema_type(s) AS t
FROM (VALUES ('{"type": ["null", "string"], "format": "date-time"}'), ('{"anyOf": [{"type": "integer"}, {"type": "null"}]}')) v(s)
ORDER BY t;
Link
Table functions
catalog (tap VARCHAR, executable := VARCHAR, pip_url := VARCHAR, python := VARCHAR, secret_name := VARCHAR, timeout_seconds := BIGINT) 1 example

Run a Singer tap's discovery and return the catalog JSON

Positional arguments
tap VARCHAR
Tap executable name, e.g. 'tap-csv' or 'tap-github'.
Named arguments
executable := VARCHAR
Path to an already installed tap executable; skips installation. · default ""
pip_url := VARCHAR
pip requirement to install the tap from, e.g. 'tap-github==1.4.0' or 'git+https://github.com/MeltanoLabs/tap-csv.git'; empty installs the package named like the tap. · default ""
python := VARCHAR
Python version for the tap's environment, e.g. '3.12'; empty = default. · default ""
secret_name := VARCHAR
Name of the singer secret holding the config; empty picks the one scoped to 'singer://<tap>'. · default ""
timeout_seconds := BIGINT
Stop the tap if it prints nothing for this many seconds; 0 waits forever. · default 300
Returns columns
catalog JSON
The whole catalog printed by --discover.
streams BIGINT
Number of streams in the catalog.
Example

How many streams tap-github discovers

SELECT streams, json_keys(catalog) AS keys
FROM singer.main.catalog('tap-github');
Link
discover (tap VARCHAR, executable := VARCHAR, pip_url := VARCHAR, python := VARCHAR, secret_name := VARCHAR, timeout_seconds := BIGINT) 1 example

Run a Singer tap's discovery and list its streams with their columns

Positional arguments
tap VARCHAR
Tap executable name, e.g. 'tap-csv' or 'tap-github'.
Named arguments
executable := VARCHAR
Path to an already installed tap executable; skips installation. · default ""
pip_url := VARCHAR
pip requirement to install the tap from, e.g. 'tap-github==1.4.0' or 'git+https://github.com/MeltanoLabs/tap-csv.git'; empty installs the package named like the tap. · default ""
python := VARCHAR
Python version for the tap's environment, e.g. '3.12'; empty = default. · default ""
secret_name := VARCHAR
Name of the singer secret holding the config; empty picks the one scoped to 'singer://<tap>'. · default ""
timeout_seconds := BIGINT
Stop the tap if it prints nothing for this many seconds; 0 waits forever. · default 300
Returns columns
tap_stream_id VARCHAR
The stream's unique id in the tap.
stream VARCHAR
The stream name.
table_name VARCHAR
Table name the stream gets in an attached tap catalog.
key_properties VARCHAR[]
Primary key properties.
replication_method VARCHAR
FULL_TABLE, INCREMENTAL or LOG_BASED, if declared.
replication_key VARCHAR
Property incremental syncs bookmark on, if declared.
valid_replication_keys VARCHAR[]
Properties that can be replication keys.
selected BOOLEAN
Whether the discovered catalog marks the stream selected.
columns STRUCT("name" VARCHAR, "type" VARCHAR)[]
Table columns with their DuckDB types.
schema JSON
The stream's JSON Schema.
metadata JSON
The stream's Singer metadata entries.
Example

Which streams tap-github offers and how each replicates

SELECT stream, key_properties, replication_method,
  len(columns) AS column_count
FROM singer.main.discover('tap-github')
ORDER BY stream;
Link
final_state (tap VARCHAR, catalog_json := VARCHAR, executable := VARCHAR, pip_url := VARCHAR, python := VARCHAR, secret_name := VARCHAR, state := VARCHAR, stream := VARCHAR, timeout_seconds := BIGINT) 1 example

Run a tap from a Singer state and return the final state and record counts

Positional arguments
tap VARCHAR
Tap executable name, e.g. 'tap-csv' or 'tap-github'.
Named arguments
catalog_json := VARCHAR
A Singer catalog JSON to use instead of running --discover. · default ""
executable := VARCHAR
Path to an already installed tap executable; skips installation. · default ""
pip_url := VARCHAR
pip requirement to install the tap from, e.g. 'tap-github==1.4.0' or 'git+https://github.com/MeltanoLabs/tap-csv.git'; empty installs the package named like the tap. · default ""
python := VARCHAR
Python version for the tap's environment, e.g. '3.12'; empty = default. · default ""
secret_name := VARCHAR
Name of the singer secret holding the config; empty picks the one scoped to 'singer://<tap>'. · default ""
state := VARCHAR
Singer state JSON to start from; empty = a full sync. · default ""
stream := VARCHAR
Only sync this stream; empty syncs every stream. · default ""
timeout_seconds := BIGINT
Stop the tap if it prints nothing for this many seconds; 0 waits forever. · default 300
Returns columns
final_state JSON
The last STATE value the tap emitted (NULL if it emitted none).
records BIGINT
RECORD messages read (plus records in BATCH files).
state_messages BIGINT
STATE messages read.
streams VARCHAR[]
Streams that produced records, sorted.
Example

Sync one tap-github stream and keep the bookmarks to resume from

SELECT records, final_state->'$.bookmarks' AS bookmarks
FROM singer.main.final_state('tap-github', stream := 'issues');
Link
messages (tap VARCHAR, catalog_json := VARCHAR, executable := VARCHAR, pip_url := VARCHAR, python := VARCHAR, secret_name := VARCHAR, state := VARCHAR, stream := VARCHAR, timeout_seconds := BIGINT) 1 example

Run a Singer tap and return its raw messages, one row per message

Positional arguments
tap VARCHAR
Tap executable name, e.g. 'tap-csv' or 'tap-github'.
Named arguments
catalog_json := VARCHAR
A Singer catalog JSON to use instead of running --discover. · default ""
executable := VARCHAR
Path to an already installed tap executable; skips installation. · default ""
pip_url := VARCHAR
pip requirement to install the tap from, e.g. 'tap-github==1.4.0' or 'git+https://github.com/MeltanoLabs/tap-csv.git'; empty installs the package named like the tap. · default ""
python := VARCHAR
Python version for the tap's environment, e.g. '3.12'; empty = default. · default ""
secret_name := VARCHAR
Name of the singer secret holding the config; empty picks the one scoped to 'singer://<tap>'. · default ""
state := VARCHAR
Singer state JSON to start from; empty = a full sync. · default ""
stream := VARCHAR
Select only this stream; empty selects every stream. · default ""
timeout_seconds := BIGINT
Stop the tap if it prints nothing for this many seconds; 0 waits forever. · default 300
Returns columns
seq BIGINT
Position of the message in the tap's output, from 1.
type VARCHAR
Message type: SCHEMA, RECORD, STATE, ACTIVATE_VERSION or BATCH.
stream VARCHAR
Stream the message belongs to; NULL for STATE.
record JSON
RECORD: the record object.
time_extracted TIMESTAMP WITH TIME ZONE
RECORD: when the tap extracted it, if sent.
version BIGINT
RECORD / ACTIVATE_VERSION: the table version, if sent.
value JSON
STATE: the state object (bookmarks).
schema JSON
SCHEMA: the stream's JSON Schema.
key_properties VARCHAR[]
SCHEMA: the primary key properties.
bookmark_properties VARCHAR[]
SCHEMA: the replication key properties.
manifest VARCHAR[]
BATCH: the batch file URLs.
message JSON
The whole message as JSON.
Example

Message counts by type for one tap-github stream

SELECT type, count(*) AS n
FROM singer.main.messages('tap-github', stream := 'issues')
GROUP BY type
ORDER BY type;
Link
read_messages (path VARCHAR) 1 example

Read Singer JSONL output files as raw messages, one row per message

Arguments
path VARCHAR
Singer JSONL output file (plain or .gz), or a glob such as 'out/*.jsonl'.
Returns columns
filename VARCHAR
File the message was read from.
line BIGINT
Line number of the message in the file, from 1.
type VARCHAR
Message type: SCHEMA, RECORD, STATE, ACTIVATE_VERSION or BATCH.
stream VARCHAR
Stream the message belongs to; NULL for STATE.
record JSON
RECORD: the record object.
time_extracted TIMESTAMP WITH TIME ZONE
RECORD: when the tap extracted it, if sent.
version BIGINT
RECORD / ACTIVATE_VERSION: the table version, if sent.
value JSON
STATE: the state object (bookmarks).
schema JSON
SCHEMA: the stream's JSON Schema.
key_properties VARCHAR[]
SCHEMA: the primary key properties.
bookmark_properties VARCHAR[]
SCHEMA: the replication key properties.
manifest VARCHAR[]
BATCH: the batch file URLs.
message JSON
The whole message as JSON.
Example

Message counts by type in saved Singer output

SELECT type, count(*) AS n
FROM singer.main.read_messages('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl')
GROUP BY type
ORDER BY type;
Link
read_records (path VARCHAR, stream VARCHAR) 1 example

Read one stream's records from Singer JSONL output files as a typed table

Arguments
path VARCHAR
Singer JSONL output file (plain or .gz), or a glob.
stream VARCHAR
Stream whose RECORD messages to return.
Returns columns
integer property BIGINT
`type: integer`
number property DOUBLE
`type: number` (or integer and number)
boolean property BOOLEAN
`type: boolean`
string property VARCHAR
`type: string` without a known format
date-time property TIMESTAMP WITH TIME ZONE
`format: date-time`; offset-less values are UTC
date property DATE
`format: date`
time property TIME
`format: time`
object property STRUCT(city VARCHAR, zip VARCHAR)
e.g. `properties` city and zip declared, no extra keys allowed, up to 4 levels deep
array property VARCHAR[]
e.g. `items: {type: string}`; items are mapped by the same rules
open property JSON
open objects, mixed types, or no type
Returns columns · depends on the arguments
integer property BIGINT
`type: integer`
number property DOUBLE
`type: number` (or integer and number)
boolean property BOOLEAN
`type: boolean`
string property VARCHAR
`type: string` without a known format
date-time property TIMESTAMP WITH TIME ZONE
`format: date-time`; offset-less values are UTC
date property DATE
`format: date`
time property TIME
`format: time`
object property STRUCT(city VARCHAR, zip VARCHAR)
e.g. `properties` city and zip declared, no extra keys allowed, up to 4 levels deep
array property VARCHAR[]
e.g. `items: {type: string}`; items are mapped by the same rules
open property JSON
open objects, mixed types, or no type
Example

Count the events records in saved Singer output

SELECT count(*) AS events
FROM singer.main.read_records('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl', 'events');
Link
read_stream (tap VARCHAR, stream VARCHAR, catalog_json := VARCHAR, executable := VARCHAR, pip_url := VARCHAR, python := VARCHAR, secret_name := VARCHAR, state := VARCHAR, timeout_seconds := BIGINT) 2 examples

Run a Singer tap and return one stream as a typed table

Positional arguments
tap VARCHAR
Tap executable name, e.g. 'tap-csv' or 'tap-github'.
stream VARCHAR
Stream to read: its tap_stream_id or stream name.
Named arguments
catalog_json := VARCHAR
A Singer catalog JSON to use instead of running --discover (e.g. from singer.main.catalog). · default ""
executable := VARCHAR
Path to an already installed tap executable; skips installation. · default ""
pip_url := VARCHAR
pip requirement to install the tap from, e.g. 'tap-github==1.4.0' or 'git+https://github.com/MeltanoLabs/tap-csv.git'; empty installs the package named like the tap. · default ""
python := VARCHAR
Python version for the tap's environment, e.g. '3.12'; empty = default. · default ""
secret_name := VARCHAR
Name of the singer secret holding the config; empty picks the one scoped to 'singer://<tap>'. · default ""
state := VARCHAR
Singer state JSON to start from (bookmarks); empty = a full sync. · default ""
timeout_seconds := BIGINT
Stop the tap if it prints nothing for this many seconds; 0 waits forever. · default 300
Returns columns
integer property BIGINT
`type: integer`
number property DOUBLE
`type: number` (or integer and number)
boolean property BOOLEAN
`type: boolean`
string property VARCHAR
`type: string` without a known format
date-time property TIMESTAMP WITH TIME ZONE
`format: date-time`; offset-less values are UTC
date property DATE
`format: date`
time property TIME
`format: time`
object property STRUCT(city VARCHAR, zip VARCHAR)
e.g. `properties` city and zip declared, no extra keys allowed, up to 4 levels deep
array property VARCHAR[]
e.g. `items: {type: string}`; items are mapped by the same rules
open property JSON
open objects, mixed types, or no type
Returns columns · depends on the arguments
integer property BIGINT
`type: integer`
number property DOUBLE
`type: number` (or integer and number)
boolean property BOOLEAN
`type: boolean`
string property VARCHAR
`type: string` without a known format
date-time property TIMESTAMP WITH TIME ZONE
`format: date-time`; offset-less values are UTC
date property DATE
`format: date`
time property TIME
`format: time`
object property STRUCT(city VARCHAR, zip VARCHAR)
e.g. `properties` city and zip declared, no extra keys allowed, up to 4 levels deep
array property VARCHAR[]
e.g. `items: {type: string}`; items are mapped by the same rules
open property JSON
open objects, mixed types, or no type
Examples (2)

The first ten customers from a CSV file read by MeltanoLabs tap-csv

SELECT id, name
FROM singer.main.read_stream('tap-csv', 'customers', pip_url := 'git+https://github.com/MeltanoLabs/tap-csv.git')
ORDER BY id
LIMIT 10;

Count the commits tap-github syncs, starting from an empty state

SELECT count(*) AS commits
FROM singer.main.read_stream('tap-github', 'commits', state := '{"bookmarks": {}}');
Link

Credentials

The secret type singer declares, as reported by the worker itself.

singer

How to get these credentials

Config JSON for a Singer tap, written to a private temporary file while the tap runs.

secret.sql
CREATE SECRET singer (
    TYPE singer,
    config '<SINGER_CONFIG>'  -- required, secret
);
Key Type Required Description
config secret VARCHAR Yes The tap's config as a JSON object, exactly what the tap reads from --config. Bind it to one tap with SCOPE 'singer://<tap-name>'.

Create the secret in the same session, after attaching singer — the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

How many streams tap-github discovers

SELECT streams, json_keys(catalog) AS keys
FROM singer.main.catalog('tap-github')

Uses catalog

The first ten customers from a CSV file read by MeltanoLabs tap-csv

SELECT id, name
FROM singer.main.read_stream('tap-csv', 'customers', pip_url := 'git+https://github.com/MeltanoLabs/tap-csv.git')
ORDER BY id
LIMIT 10

Uses read_stream

Sync one tap-github stream and keep the bookmarks to resume from

SELECT records, final_state->'$.bookmarks' AS bookmarks
FROM singer.main.final_state('tap-github', stream := 'issues')

Uses final_state

Message counts by type for one tap-github stream

SELECT type, count(*) AS n
FROM singer.main.messages('tap-github', stream := 'issues')
GROUP BY type
ORDER BY type

Uses messages

Message counts by type in saved Singer output

SELECT type, count(*) AS n
FROM singer.main.read_messages('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl')
GROUP BY type
ORDER BY type

Uses read_messages

Count the events records in saved Singer output

SELECT count(*) AS events
FROM singer.main.read_records('https://raw.githubusercontent.com/Query-farm/vgi-singer/v0.1.0/test/fixtures/fake-output.jsonl', 'events')

Uses read_records

3 more examples in the Catalog, each listed under the table or function it uses.

Singer is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.