Skip to main content

Products

The Products resource (client.products) provides full CRUD operations on data products in the Qarion catalog, along with refresh tracking and lineage management.

Methods

list(space_slug, *, query=, tags=, include_archived=)

List products in a space with optional filtering.

ParameterTypeDefaultDescription
space_slugstrrequiredSpace identifier
querystr | NoneNoneSearch string
tagslist[str] | NoneNoneTag filter
include_archivedboolFalseInclude archived products

Returns: list[ProductSummary]

products = await client.products.list("marketing-analytics", query="customer")

get(space_slug, product_slug)

Get a product by its slug within a space.

ParameterTypeDescription
space_slugstrSpace identifier
product_slugstrProduct slug

Returns: Product

product = await client.products.get("marketing-analytics", "customer-events")

get_by_id(product_id)

Get a product by UUID (cross-space).

ParameterTypeDescription
product_idUUIDProduct UUID

Returns: Product

from uuid import UUID
product = await client.products.get_by_id(UUID("550e8400-..."))

create(space_slug, *, name, slug=, description_markdown=, product_type=, tags=, **extra)

Create a new data product.

ParameterTypeDefaultDescription
space_slugstrrequiredTarget space
namestrrequiredDisplay name
slugstr | NoneNoneURL-friendly slug (auto-generated if omitted)
description_markdownstr | NoneNoneMarkdown description
product_typestr | NoneNoneType (table, view, dashboard, etc.)
tagslist[str] | NoneNoneTags

Returns: Product

product = await client.products.create(
"marketing-analytics",
name="Campaign Metrics",
slug="campaign-metrics",
product_type="table",
description_markdown="Aggregated campaign performance data",
)

update(space_slug, product_id, **fields)

Update a data product.

ParameterTypeDescription
space_slugstrSpace identifier
product_idUUIDProduct UUID
**fieldsAnyFields to update

Returns: Product

product = await client.products.update(
"marketing-analytics",
product_id,
description_markdown="Updated description",
)

register_product(space_slug, name, *, slug=, description_markdown=, product_type=, tags=, **extra)

Upsert a data product — creates it if it does not exist, or updates it if it already does (matched by slug).

This is the recommended method for CI/CD pipelines and automation scripts.

ParameterTypeDefaultDescription
space_slugstrrequiredTarget space
namestrrequiredProduct name
slugstr | NoneNoneProduct slug (auto-generated from name if omitted)
description_markdownstr | NoneNoneMarkdown description
product_typestr | NoneNoneProduct type
tagslist[str] | NoneNoneTags

Returns: Product

product = await client.products.register_product(
"marketing-analytics",
"Campaign Metrics",
product_type="table",
)

Refresh Tracking

register_refresh(space_slug, product_id, **data)

Register a data product refresh event (e.g., from Airflow, dbt, or any ETL pipeline).

ParameterTypeDescription
space_slugstrSpace identifier
product_idUUIDProduct UUID
**dataAnyRefresh metadata (trigger_source, status, etc.)

Returns: ProductRefreshResponse

refresh = await client.products.register_refresh(
"marketing-analytics",
product_id,
trigger_source="airflow",
status="success",
)

list_refreshes(space_slug, product_id, limit=50, offset=0)

List refresh history for a product (newest first).

Returns: list[ProductRefreshSummary]


get_latest_refresh(space_slug, product_id)

Get the most recent successful refresh.

Returns: ProductRefreshResponse | None


get_refresh_stats(space_slug, product_id)

Get aggregate refresh statistics.

Returns: ProductRefreshStats


Lineage Management

set_lineage(space_slug, product_id, *, upstream_ids=, downstream_ids=)

Replace the entire lineage for a product.

ParameterTypeDescription
upstream_idslist[UUID] | NoneUpstream dependency product UUIDs
downstream_idslist[UUID] | NoneDownstream dependency product UUIDs

Returns: Product

await client.products.set_lineage(
"marketing-analytics",
product_id,
upstream_ids=[raw_events_id, user_profiles_id],
)

get_lineage(space_slug, product_slug)

Get lineage information for a product.

Returns: dict with upstream and downstream lists.


add_upstream(space_slug, product_slug, upstream_id)

Add a single upstream dependency.

Returns: Product


add_downstream(space_slug, product_slug, downstream_id)

Add a single downstream dependency.

Returns: Product