tap-hubspot
is a Singer tap for Hubspot.
Built with the Meltano Tap SDK for Singer Taps.
Hubspot tap class.
Built with the Meltano SDK for Singer Taps and Targets.
catalog
state
discover
about
stream-maps
schema-flattening
Setting | Required | Default | Description |
---|---|---|---|
access_token | True | None | PRIVATE Access Token for Hubspot API (TODO: Add public option) |
start_date | True | None | The earliest record date to sync |
stream_maps | False | None | Config object for stream maps capability. |
stream_map_config | False | None | User-defined config values to be used within map expressions. |
flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
flattening_max_depth | False | None | The max depth to flatten schemas. |
A full list of supported settings and capabilities is available by running: tap-hubspot --about
This is a Singer tap that produces JSON-formatted data following the Singer spec.
This tap:
- Pulls raw data from HubSpot's REST API
- Extracts the following resources from HubSpot
- Outputs the schema for each resource
- Incrementally pulls data based on the input state
This tap requires a config.json
which specifies details regarding OAuth 2.0 authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See config.sample.json for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below.
To run tap-hubspot
with the configuration file, use this command:
› tap-hubspot -c my-config.json
As an alternative to OAuth 2.0 authentication during development, you may specify an API key (HAPIKEY
) to authenticate with the HubSpot API. This should be used only for low-volume development work, as the HubSpot API Usage Guidelines specify that integrations should use OAuth for authentication.
To use an API key, include a hapikey
configuration variable in your config.json
and set it to the value of your HubSpot API key. Any OAuth authentication parameters in your config.json
will be ignored if this key is present!
Copyright © 2017 Stitch
You can easily run tap-hubspot
by itself or in a pipeline using Meltano.
tap-hubspot --version
tap-hubspot --help
tap-hubspot --config CONFIG --discover > ./catalog.json
pipx install poetry
poetry install
Create tests within the tap_hubspot/tests
subfolder and
then run:
poetry run pytest
You can also test the tap-hubspot
CLI interface directly using poetry run
:
poetry run tap-hubspot --help
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-hubspot
meltano install
Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke tap-hubspot --version
# OR run a test `elt` pipeline:
meltano elt tap-hubspot target-jsonl
See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.