Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagster_hightouch-0.1.6.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_hightouch-0.1.6-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file dagster_hightouch-0.1.6.tar.gz.

File metadata

  • Download URL: dagster_hightouch-0.1.6.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for dagster_hightouch-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5f7573d965edf7454b2e321dc9abb8c38b630eb58c78641b76998f4cff636f21
MD5 53be640ce3844ddd4cc3d4d38d0abd06
BLAKE2b-256 cd3b15020d2c1a10eff6b4080aa66175478bda4abee0c6b9e11bf49fd8fb7f1e

See more details on using hashes here.

File details

Details for the file dagster_hightouch-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_hightouch-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 adde1976ab21f760656208d9f9966fbaca2729bbefe86256eb57e1dbeee70788
MD5 a62c80e991c9fb89138aa18ede7690eb
BLAKE2b-256 0422be626b523cddee249cc6a435b525afecf60c64c07a5fb990f78a6a3e97ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page