Skip to main content

Dagster & Census (Pythonic)

Community integration

This is a community-maintained integration. To report bugs or leave feedback, open an issue in the Dagster community integrations repo.

note

If you are just getting started with the Census integration, we recommend using the new Census component.

This guide provides instructions for using Dagster with Census using the dagster-census library. Your Census syncs can be represented as assets in the Dagster asset graph, allowing you to track lineage and dependencies between Census assets and data assets you are already modeling in Dagster. You can also use Dagster to orchestrate Census syncs, allowing you to trigger syncs on a cadence or based on upstream data changes.

Installation

uv add dagster-census

Example

from dagster_census import CensusResource

import dagster as dg


@dg.asset
def census_sync(census: CensusResource):
census.trigger_sync_and_poll(sync_id=12345)


defs = dg.Definitions(
assets=[census_sync],
resources={"census": CensusResource(api_key=dg.EnvVar("CENSUS_API_KEY"))},
)

About Census

Census syncs data from your cloud warehouse to the SaaS tools your organization uses. It allows everyone in your organization to take action with good data, no custom scripts or API integrations required.