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.
| Parameter | Type | Default | Description |
|---|---|---|---|
space_slug | str | required | Space identifier |
query | str | None | None | Search string |
tags | list[str] | None | None | Tag filter |
include_archived | bool | False | Include 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.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
product_slug | str | Product slug |
Returns: Product
product = await client.products.get("marketing-analytics", "customer-events")
get_by_id(product_id)
Get a product by UUID (cross-space).
| Parameter | Type | Description |
|---|---|---|
product_id | UUID | Product 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
space_slug | str | required | Target space |
name | str | required | Display name |
slug | str | None | None | URL-friendly slug (auto-generated if omitted) |
description_markdown | str | None | None | Markdown description |
product_type | str | None | None | Type (table, view, dashboard, etc.) |
tags | list[str] | None | None | Tags |
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.
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
product_id | UUID | Product UUID |
**fields | Any | Fields 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
space_slug | str | required | Target space |
name | str | required | Product name |
slug | str | None | None | Product slug (auto-generated from name if omitted) |
description_markdown | str | None | None | Markdown description |
product_type | str | None | None | Product type |
tags | list[str] | None | None | Tags |
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).
| Parameter | Type | Description |
|---|---|---|
space_slug | str | Space identifier |
product_id | UUID | Product UUID |
**data | Any | Refresh 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.
| Parameter | Type | Description |
|---|---|---|
upstream_ids | list[UUID] | None | Upstream dependency product UUIDs |
downstream_ids | list[UUID] | None | Downstream 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