dagster-sigma library
Dagster allows you to represent the workbooks and datasets in your Sigma project as assets alongside other technologies including dbt and Sling. This allows you to visualize relationships between your Sigma assets and their dependencies.
Related documentation pages: Using Dagster with Sigma.
Component
classdagster_sigma.SigmaComponent [source]- beta
This API is currently in beta, and may have breaking changes in minor version releases, with behavior changes in patch releases.
Pulls in the contents of a Sigma organization into Dagster assets.
Example:
# defs.yaml
type: dagster_sigma.SigmaComponent
attributes:
organization:
base_url: https://aws-api.sigmacomputing.com
client_id: "{{ env.SIGMA_CLIENT_ID }}"
client_secret: "{{ env.SIGMA_CLIENT_SECRET }}"
sigma_filter:
workbook_folders:
- ["My Documents", "Analytics"]
include_unused_datasets: false- get_asset_spec [source]
Generates an AssetSpec for a given Sigma content item.
This method can be overridden in a subclass to customize how Sigma content (workbooks, datasets) are converted to Dagster asset specs. By default, it delegates to the configured DagsterSigmaTranslator.
Parameters: data – The SigmaTranslatorData containing information about the Sigma content item and organizationReturns: An AssetSpec that represents the Sigma content as a Dagster asset
Example:
Override this method to add custom tags based on content properties:
from dagster_sigma import SigmaComponent
from dagster import AssetSpec
class CustomSigmaComponent(SigmaComponent):
def get_asset_spec(self, data):
base_spec = super().get_asset_spec(data)
return base_spec.replace_attributes(
tags={
**base_spec.tags,
"sigma_type": data.properties.get("type"),
"owner": data.properties.get("ownerId")
}
)
To use the Sigma component, see the Sigma component integration guide.
YAML configuration
When you scaffold a Sigma component definition, the following defs.yaml configuration file will be created:
type: dagster_sigma.SigmaComponent
attributes:
organization:
base_url: "{{ env.SIGMA_BASE_URL }}"
client_id: "{{ env.SIGMA_CLIENT_ID }}"
client_secret: "{{ env.SIGMA_CLIENT_SECRET }}"
Sigma API
Here, we provide interfaces to manage Sigma projects using the Sigma API.