Bridging the gap between metrics and analytics with Hex + Transform

Our vision for Transform is to be your single source of truth for metrics—integrating with all the downstream tools you know and love. In another step to fulfill that mission, we’re excited to reveal our integration with Hex.

Hex is a collaborative data workspace. You can use Hex to do interactive exploration of your data, whether through SQL, in Python, or through both with Dataframe SQL. You can even use your project to build interactive data apps.

When exploring data, people often run into inconsistencies in their definitions of key business metrics. Let’s say the definition of a metric changes. Old analyses may not be updated, leading to misalignment and lack of trust in the data.

A metrics store helps to combat these issues and ensure your metrics are always correct and up to date. While Hex provides a powerful platform to interact with your data, Transform provides that missing metrics layer for metrics governance and consistency.

How to use Transform and Hex together

To access that Metrics Store within Hex, you can use Transform’s Metrics API—either through our Python Library or our SQL API.

Transform’s SQL API (via JDBC)

To get the same metric through Transform’s Python Library you can run:

SELECT * FROM MQL_QUERY(<revenue BY country>)

To use the SQL API go to Workspace Assets > + Connection and then choose Transform.

Configuring a new Transform connection in Hex.

Once you have a connection to Transform you can explore metrics and the potential dimension combinations by asking for a list of metrics and dimensions:

select * from mql_list_metrics()

You can then run a query by passing metrics and dimensions such as the Revenue metric by the Country Dimension into the "from" statement of a query using the mql_query operator.

select * from mql_query(<revenue by country>)

Transform’s Python Library

Transform's Python Interface allows users to express MQL requests to query their metrics and dimensions in Python scripts and notebooks.

Our Python API is shipped with our command-line interface.

pip install transform

Before querying Transform, you authenticate to gain access to the appropriate metrics for your access level:

mql.setup(<API_KEY>)

You can then access metrics through the MQL Client by passing metrics and dimensions such as the Revenue metric by the Country Dimension:

df = mql.query(["revenue"], ["country"])

The data is returned as a Pandas DataFrame making it easy to integrate MQL Queries with your existing data workflows.

Bridging the gap between metrics governance and powerful analytics

Combining Hex and Transform gives you a powerful interface for your critical business metrics and gives you the confidence that they’re always accurate and up-to-date.

Bring the power of Transform into Hex to build data applications with your metrics.

This is just one step we’re taking to bridge the gap between the metrics layer and analytics platforms. We’re excited to continue to partner with the Hex team to create the best experience for our customers.

Andy Kramolisch

Andy Kramolisch

Andy is a software engineer at Transform.