Release - June 25th, 2021
#
✨ New ✨#
New Time Format in FrameworkDetails
Product Component
Metrics Framework
More Detail
In order to benefit from our upcoming Materializations feature as well as some of our new charting features (both slotted to ship shortly), we require some changes in your configurations in the framework around time dimensions. We will reach out to you about this and work closely with you to make sure this transition goes smoothly. See details below:
Benefits
- More flexibility in time components when querying MQL
- Materialization use - primary time dimension required for materializing sets of metrics
- Intelligently offer group by's and granularity options with the data
- Use front-end features that require granularity and format, like offset calculations (e.g., year over year)
- Paves path for future support of additional granularity and format options explicitly in the framework
Time Dimension Primary, Format, and Granularity
Today, you define your time dimension as follows with a name, type (and an optional expression)
dimensions:- name: ds type: time
Now, you specify those components along with a few type parameters (under type_params).
dimensions: - name: ds type: time type_params: is_primary: True time_format: YYYY-MM-DD time_granularity: day
- The primary time dimension is mostly used for materializations and it's used as the common time dimension for all metrics you're materializing in a config.
- Granularity currently supports day but (in the future will support more and less granular options)
- Format currently supports
YYYY-MM-DD
(in the future we will support additional formats) - NOTE: The name of your primary time dimension must be the same across all your data sources.
#
JDBC Connector BetaDetails
Product Component
Interfaces - JDBC
More Detail
We're starting our journey to build additional APIs beyond our command-line client that allows you to move data from Transform into your third-party tools of choice. To start, we've released a beta of our JDBC connector. I prefer tea, but I'm pretty energized by Java (heh).
The JDBC Connector allows you to express MQL requests directly in a SQL query for tools that support the common JDBC interface (examples below). With our connector, you can be confident that all the third-party tools that you're querying from are getting the same data from cleaned metrics that are defined and governed in Transform.
Verification Steps
Please reach out to Transform for the Beta and we will set you up with the connector as well as more documentation. See summarized details below on usage and documentation.
Usage
MQL parameters
SELECT ...
FROM MQL(
[metric,...]]
[BY]
[dimension,..]
{WHERE expr}
{ORDER BY {col_name | expr | position} [ASC | DESC], ...]}
{LIMIT [rowcount]}
)...;
Examples
Consider the following metric, dimension, and measures list from a popular travel booking service. It contains a dimensional data source for listings (listing
) as well as a fact data source (bookings
) and values associated with them.
SELECT * FROM MQL_LIST_METRICS();
If we want to examine the bookings
metric and query bookings
by the dimension country
, the API request in your tool would be the following.
SELECT * FROM MQL(bookings BY country);
Any supported SQL in your data warehouse is valid outside of the MQL request, so you can do more analysis outside of the request as well as join onto other tables in the data warehouse.
SELECT AVG(booking_value) AS avg_booking_valueFROM MQL( booking_value BY ds WHERE ds >= '2020-01-01')GROUP BY 1;