Dagster library for Hightouch
Project description
dagster-hightouch
A Dagster library for triggering syncs in Hightouch.
Installation
To install the library, use pip alongside your existing Dagster environment.
pip install dagster-hightouch
Configuration
First, you'll need to specify your Hightouch API key as a resource.
# resources.py
from dagster_hightouch.resources import ht_resource as hightouch_resource
ht_resource = hightouch_resource.configured(
{"api_key": "555555-4444-3333-2222-1111111111"},
)
Ops
The hightouch_sync_op will call the Hightouch API to trigger
a sync and monitor it until it completes.
from dagster import ScheduleDefinition, get_dagster_logger, job
from dagster_hightouch.ops import hightouch_sync_op
from .resources import ht_resource
# Sync IDs are set as constants. You can also use
# the sync slug, read the documentation for other
# options.
HT_WS = "23620"
HT_ORG = "39619"
# We define two configured sync ops
run_ht_sync_workspaces = hightouch_sync_op.configured(
{"sync_id": HT_WS}, name="hightouch_sfdc_workspaces"
)
run_ht_sync_orgs = hightouch_sync_op.configured(
{"sync_id": HT_ORG}, name="hightouch_sfdc_organizations"
)
# And create a job with the defined resources, specifying the dependencies.
@job(
resource_defs={
"hightouch": ht_resource,
}
)
def ht_sfdc_job():
ht_orgs = run_ht_sync_orgs(start_after=ht_contacts)
run_ht_sync_workspaces(start_after=ht_orgs)
# And we schedule it to run every 30 mins.
every_30_schedule = ScheduleDefinition(job=ht_sfdc_job, cron_schedule="*/30 * * * *")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dagster_hightouch-0.1.7.tar.gz.
File metadata
- Download URL: dagster_hightouch-0.1.7.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cddd11f970222b7a8823ca4a5cb77738270aa808fc8d22d875aa7026ef390c7
|
|
| MD5 |
03ad8ff0558d34f8eec4dacb591d0c7e
|
|
| BLAKE2b-256 |
dfa68ba0916d20c8485a681c0019f3a4805af1dd51064af3fcb3e94bc0d4ce2d
|
File details
Details for the file dagster_hightouch-0.1.7-py3-none-any.whl.
File metadata
- Download URL: dagster_hightouch-0.1.7-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65328317c35127599996e2bebff6487e6c0ef4ed8005ce67d992a448b6dc4d91
|
|
| MD5 |
127f1edf03a1131ae05d5479b2465966
|
|
| BLAKE2b-256 |
d6e3114acfe4daf7422c0c95f454c8da1e573abb91a88e5610b6120bcfcbed71
|