Skip to main content

metriql Superset integration

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metriql-superset-0.6.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

metriql_superset-0.6-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file metriql-superset-0.6.tar.gz.

File metadata

  • Download URL: metriql-superset-0.6.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for metriql-superset-0.6.tar.gz
Algorithm Hash digest
SHA256 85a6a8b9ffd1e2547593a13e3556caa795dd38ca7289c5176fa5c4556140411e
MD5 8ec2216a289b8b1c3526fb4285c1c904
BLAKE2b-256 90f5d3b08527b611d99e7d6568ddfbc5737e0b5ebfe4d7a15530feae06308f7a

See more details on using hashes here.

File details

Details for the file metriql_superset-0.6-py3-none-any.whl.

File metadata

  • Download URL: metriql_superset-0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for metriql_superset-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f02707a5809e5e5099d72533941a96359b25c57ca7ba637e1da46bfd671f7b
MD5 30f65caec4f94a2dab55893e74712110
BLAKE2b-256 5de07e3b97bb33dd1864b127b067df7ed277e4979f66c8daeb9b311e99d04628

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page