Skip to main content

Metriql Superset Integration

Synchronize Superset datasets from Metriql datasets. The idea is to leverage Metriql datasets in your Superset workflow without any additional modeling in Superset.

Usage

The library is available in PyPI so you can install it via pip as follows:

pip install metriql-superset

The library expects stdin for the metriql metadata and interacts with Superset via session tokens. Here is an example:

curl http://metriql-server.com/api/v0/metadata | metriql-superset --metriql-url http://metriql-server.com --superset-username USERNAME --superset-password PASSWORD sync-database

You can use --file argument instead of reading the metadata from stdin as an alternative.

Available commands are create-database, list-databases, sync-database.

FAQ

Why don't you use Superset API?

While Superset provides an API, it doesn't let updating / creating datasets and databases. Therefore, we create session token using internal APIs and interact with the internal APIs.

Do you support Preset Cloud?

Yes! Preset offers an API in their Enterprise Plan and you can use the API tokens to be able to synchronize the metrics of Superset deployments in your Preset account. The token in the picture below should be passed as --superset-username and the value of secret should be passed as --superset-password:

Preset API Token

Why do I need to run a separete service to use metriql-superset?

Metriql requires you to run a separate service to be able to access the data in your data warehouse. In some cases, it might be overhead and we would love to get contributions from the community to make metriql-superset compatible with dbt metrics once they're released. However; here are the benefits of running Metriql as a separate service:

  1. Superset doesn't support JOIN relations in query builder since Metriql exposes all the fields including the ones that come from the relations as database columns, you will be able to unlock that feature in Superset.
  2. Metriql has Aggregates which speeds up OLAP queries by pre-aggregating the fact tables. It re-writes the queries Superset runs on Metriql before executing them in your data warehouse.
  3. Metriql has an advanced semantic layer that lets you create filtered measures, non-additive and window measures which are not available in Superset. Additionally, you can use Jinja expressions in your metrics/dimensions.
  4. Superset has timeframes to some extent but Metriql offers a set of different timeframes that lets you analyze the data in different granularities.
  5. It's not possible to access the metrics created in Superset from a different BI tool / SQL client but Metriql lets you access your metrics from different data tools.

Release files for metriql-superset 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metriql-superset 0.6
File Size Uploaded
metriql-superset-0.6.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metriql-superset 0.6
File Interpreter ABI Platform
metriql_superset-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / metriql-superset-0.6.tar.gz

Download URL metriql-superset-0.6.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
85a6a8b9ffd1e2547593a13e3556caa795dd38ca7289c5176fa5c4556140411e
BLAKE2b-256 checksum
How to use checksums
90f5d3b08527b611d99e7d6568ddfbc5737e0b5ebfe4d7a15530feae06308f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / metriql_superset-0.6-py3-none-any.whl

Download URL metriql_superset-0.6-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8f02707a5809e5e5099d72533941a96359b25c57ca7ba637e1da46bfd671f7b
BLAKE2b-256 checksum
How to use checksums
5de07e3b97bb33dd1864b127b067df7ed277e4979f66c8daeb9b311e99d04628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page