Singer tap for dbt, built with the Singer SDK.
Project description
tap-dbt
tap-dbt
is a Singer tap for the dbt Cloud API v2.
Built with the Singer SDK.
Installation
pip install tap-dbt
Features
- Stream: accounts
- Stream: projects
- Stream: jobs
- Stream: runs
- Incremental streams
Configuration
Visit the API docs for instructions on how to get your API key.
You can pass configuration using environment variables with the TAP_DBT_
prefix followed by the uppercased field name
tap-dbt --config=ENV
or a JSON file
tap-dbt --config=config.json
Inputs
Field | Description | Type | Required | Default |
---|---|---|---|---|
api_key |
API key for the dbt Cloud API | string |
yes | |
account_ids |
dbt Cloud account IDs | list(string) |
yes | |
user_agent |
User-Agent to make requests with | string |
no | tap-dbt/0.1.0 Singer Tap for the dbt Cloud API |
base_url |
Base URL for the dbt Cloud API | string |
no | https://cloud.getdbt.com/api/v2 |
page_size |
Number of records per API call, sets the limit= url parameter |
integer |
no | 5000 |
A full list of supported settings and capabilities for this tap is available by running:
tap-dbt --about --format json
JSON example
{
"api_key": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"account_ids": ["51341"],
"user_agent": "tap-dbt/0.1.0 Singer Tap for the dbt Cloud API",
"base_url": "https://my-dbt-cloud-api.com",
"page_size": 5000
}
Environment variables example
TAP_DBT_API_KEY=da39a3ee5e6b4b0d3255bfef95601890afd80709
TAP_DBT_ACCOUNT_IDS=51341
TAP_DBT_USER_AGENT='tap-dbt/0.1.0 Singer Tap for the dbt Cloud API'
TAP_DBT_BASE_URL=https://my-dbt-cloud-api.com"
TAP_DBT_PAGE_SIZE=5000
Meltano Example
plugins:
extractors:
- name: tap-dbt
logo_url: https://hub.meltano.com/assets/logos/taps/dbt.png
label: dbt Cloud
docs: https://hub.meltano.com/taps/dbt
repo: https://github.com/edgarrmondragon/tap-dbt
namespace: dbt
pip_url: tap-dbt
executable: tap-dbt
capabilities:
- catalog
- discover
settings:
- name: base_url
label: dbt Cloud URL
placeholder: "https://cloud.getdbt.com/api/v2"
- name: api_key
kind: password
label: API Key
docs: "https://docs.getdbt.com/dbt-cloud/api#section/Authentication"
- name: account_ids
kind: array
label: Account IDs
- name: user_agent
label: User-Agent
placeholder: "tap-dbt/0.1.0 Singer Tap for the dbt Cloud API"
- name: page_size
kind: integer
label: Page Size
Usage
You can easily run tap-dbt
with the CLI or using Meltano.
Executing the Tap Directly
tap-dbt --version
tap-dbt --help
tap-dbt --config .secrets/example.json --discover > ./catalog/json
With Meltano
meltano elt tap-dbt target-snowflake --job_id dbt_snowflake
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tap_dbt-0.5.1a1.tar.gz
(12.3 kB
view hashes)
Built Distribution
tap_dbt-0.5.1a1-py3-none-any.whl
(13.2 kB
view hashes)
Close
Hashes for tap_dbt-0.5.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb5fe20403d3474bbc5ebae22383a835af803350ef4c5d3fd881d7314794878 |
|
MD5 | 7ff37fc2c50f60a4800d79e6dced21b4 |
|
BLAKE2b-256 | 1641023fba03f6de373cd1ae41ceb95a5f1b4674e14a73da47e8721441634d3a |