Dagster Integration:
Using Dagster with Cube
Push changes from upstream data sources to Cube's semantic layer.
About this integration
With the dagster_cube
integration you can setup Cube and Dagster to work together so that Dagster can push changes from upstream data sources to Cube via the Orchestration API.
Installation
pip install dagster_cube
Example
import dagster as dg
from dagster_cube import CubeResource
@dg.asset
def cube_query_workflow(cube: CubeResource):
response = cube.make_request(
method="POST",
endpoint="load",
data={"query": {"measures": ["Orders.count"], "dimensions": ["Orders.status"]}},
)
return response
defs = dg.Definitions(
assets=[cube_query_workflow],
resources={
"cube": CubeResource(
instance_url="https://<<INSTANCE>>.cubecloudapp.dev/cubejs-api/v1/",
api_key=dg.EnvVar("CUBE_API_KEY"),
)
},
)
About Cube
Cube.js is the semantic layer for building data applications. It helps data engineers and application developers access data from modern data stores, organize it into consistent definitions, and deliver it to every application.
Community / Partner integration:
This integration was built and is maintained by a community user or a technology partner from outside of Dagster Labs.