Steampipe
The Tomba plugin for Steampipe exposes six Tomba endpoints as SQL tables. Tomba builds and maintains it; the source is at github.com/tomba-io/steampipe-plugin-tomba and the listing at hub.steampipe.io/plugins/tomba-io/tomba.
Every query that reads a Tomba table sends API requests: one for each value you give a table's required column, including each value in an in (...) list and each row a join supplies. Those requests are charged and throttled like direct API calls; see Credit costs and Rate limits.
Prerequisites
- Steampipe installed.
- A Tomba API key and secret. See Get your key and secret.
Install and connect
-
Install the plugin:
Code -
Put your credentials in
~/.steampipe/config/tomba.spc:CodeIf
keyorsecretis absent from the file, the plugin reads theTOMBA_KEYandTOMBA_SECRETenvironment variables. Values in the file take precedence.
Tables
Each table requires the column listed, with an = or in condition, except tomba_account.
| Table | Required column | Endpoint | Columns |
|---|---|---|---|
tomba_verifier | email | GET /email-verifier | email, status, result, score, accept_all, block, registrar_name, created_date, referral_url |
tomba_enrich | email | GET /enrich | email, first_name, last_name, gender, company, website_url, country, twitter, linkedin, sources |
tomba_linkedin | url | GET /linkedin | url plus the tomba_enrich columns |
tomba_author | url | GET /author-finder | url plus the tomba_enrich columns |
tomba_count | domain | GET /email-count | domain, total, personal_emails, generic_emails, department, seniority |
tomba_account | — | GET /me | user_id, email, first_name, last_name, country, timezone, created_at, pricing, secret_token |
sources, department, and seniority are JSON columns. secret_token holds your account's API secret, so restrict access to tomba_account when you share a Steampipe instance.
Steampipe caches query results for 300 seconds by default, so repeating a query within that time doesn't call Tomba again.
Example
Verify a list of addresses and keep the deliverable ones. The join sends one verification request per row of leads:
Code
result is one of the result values. Filter on result rather than status: status can be valid or Valid.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
key must be configured or secret must be configured | The credential is in neither tomba.spc nor the environment. | Set key and secret in tomba.spc, or export TOMBA_KEY and TOMBA_SECRET. |
| An error says a required qual is missing | The query doesn't give the table's required column. | Add a where condition or join on the column listed above. |
The error contains "type":"quota_exceeded" | Not enough credits for the requests. | See Credits and usage. |
The error contains "type":"rate_limit" | The query sent requests faster than your plan allows. | Query fewer values at a time. See Rate limits. |
A lookup returns nothing for a URL or address that contains &, #, or + | The plugin doesn't URL-encode values. | Query the API directly for those values. |