Skip to main content

Dagster library for Hightouch

Project description

PyPi Publish

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.5.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

dagster_hightouch-0.1.5-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file dagster-hightouch-0.1.5.tar.gz.

File metadata

  • Download URL: dagster-hightouch-0.1.5.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for dagster-hightouch-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8780ae3f1762337146e94a192c4a1ba2c0e0053adafa31c4c22456b23ef2d574
MD5 c8324577fcf53d8cd7ddb088ccb6741a
BLAKE2b-256 c6559408d8463bb6213272e12384b10d6a20f4d70f17fcc993aa9675c54546cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dagster_hightouch-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b049baf15f75e39755d657fb197b4351371732920dbe2a5574fc81ac96018ba
MD5 3effc4ecdcff77d1ea09aa087762635b
BLAKE2b-256 337781a747ca532dab3294b8310464cb93f13d5c398a537ee4eb65ce266e52d2

See more details on using hashes here.

Supported by

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