Release - August 23rd, 2021
#
โจ New โจ#
Composite KeysDetails
Product Component
Metrics Framework
More Detail
Transform's framework now supports configuring data sources that contain composite keys. In database design, a composite key is a key that consists of two or more attributes (table columns) that together uniquely identify an entity occurrence or a table row, juxtaposed to a key that uses a single field.
Transform supports composite foreign and composite primary keys which can be defined in the identifiers section of the data source and used to do joins between your data sources like any other identifier.
Verification Steps
Imagine for the following example that a table has a composite key made up of two fields: user_id
and message_id
To create
- Name the composite key using the same
name
field as when naming any other identifier. In this example's case, it'suser_message
ref
may be specified instead to reference another identifier, in which case thename
andexpr
are inherited from the referenced identifier- Define the fields that make up your key ahead of defining the key itself.
- Specify the composite primary key via the identifier type
primary
. - The fields that make up the key should be listed under
identifiers
.
data source: users identifiers: - name: message expr: message_id type: foreign - name: user_message type: primary identifiers: - ref: message - name: user_id
#
Metric Notifications for QuestionsDetails
Product Component
Metrics Catalog
More Detail
Metric owners will now get notified via email if a question is asked on a metric.
Verification Steps
- Ask a question on a metric and confirm the owner gets notified via the email tied to their Transform account.
- If the owner is on a team, everyone on the team should receive an email.
#
Granularity ImprovementsDetails
Product Component
Metrics Catalog
More Detail
- Granularity is now available for ratio metrics as well as metrics based off measures that use an aggregation of count distinct.
- When you choose a Weekly granularity in the catalog, it now defaults to your data warehouse's settings on the week start truncation. Previously, we defaulted to a Sunday start. To determine what your data warehouse settings are, you can check your data warehouse documentation, or run a function like
DATE_TRUNC('week', <sample-date>)
to confirm what the starting date is. - We no longer show a default daily granularity on the metric page. (Side Note: we may later support default granularity once we have more options supported at the model level - e.g. monthly)
- If data is missing when granularity is selected, we fill in 0's only for metrics based on measures that use count sum aggregations. For other metric types such as an average, we will show missing values.
Verification Steps
- Navigate to the user interface to a ratio metric or one that uses a measure of count distinct and confirm Granularity is present
- Choose weekly granularity on any metric and confirm the week start range on the tooltip matches what your data warehouse returns for DATE_TRUNC('week', date).
- Navigate to a metric with large chunks of missing data (a monthly metric is a good example), and confirm that 0's are not filled in for those missing dates.
- Select granularity on data that's incomplete
- For a sum or count metric, confirm 0's are filled in for the missing time periods
- For all other measure aggregation types (e.g., avg), confirm data is not filled in with 0's and instead has gaps.
#
Show All Dimensions in List-MetricsDetails
Product Component
Interfaces - MQL CLI
More Detail
mql list-metrics
will by default list 5 dimensions associated with a metric and denote that there are x more depending on the remaining number.
We added a --show-all-dims
argument in case you want to view the full list of dimensions associated with a metric.
Verification Steps
Run mql list-metrics --show-all-dims
#
Query Metrics with Different Time granularitiesDetails
Product Component
Interfaces - MQL CLI
More Detail
MQL now allows you to query metrics using the time dimensions grouped by specific granularities. For example, assuming ds
is the name of your primary time dimension:
Typically, you might run something like:
mql query --metrics yourmetric --dimensions ds
You can now run something like the following to get your metric values grouped by a given granularity:
mql query --metrics yourmetric --dimensions ds__month
We support day
, month
, week
, year
, quarter
.
Note you can also achieve this by using the --time-granularity
argument; the gendered approach is a shortcut.
Verification Steps
Query your metrics by adding a double underscore and either day, month, week, year, quarter afterward
mql query --metrics yourmetric --dimensions <your-primary-time-dimension-name>__<month|day|week|quarter|year
#
Ratio Metric DisplayDetails
Product Component
Metrics Catalog
More Detail
We now surface ratio metrics as percents by default. We multiply the number by 100 to display and add a percent sign.
Verification Steps
Access a ratio metric and confirm the y-axis units is %
and the values are percentages.
#
Delete QuestionDetails
Product Component
Metrics Catalog
More Detail
We now provide the ability to delete questions on a metric.
Verification Steps
Hover over a question and notice a trash can appear on the right-hand side.
If you delete a question, all replies will automatically be deleted.
#
Admins can edit annotationDetails
Product Component
Metrics Catalog
More Detail
Admin users can now edit any user's annotations.
Verification Steps
As an admin, go to an annotation that you didn't author and confirm when you scroll over it, the edit and delete button appears.
If you delete a question, all replies will automatically be deleted.
#
Changed Boolean to Sum BooleanDetails
Product Component
Metrics Framework
More Detail
We introduced an aggregation of boolean into the Framework for a measure that could be expressed using an agg:boolean
. We renamed this to sum_boolean
since we believe this more accurately represents an aggregation of boolean columns in a data source.
Note that the current boolean
type is still supported, but we do recommend that you change it to sum_boolean
, as we may deprecate the original in the future.
Verification Steps
Create a measure with an aggregation type of sum_boolean.
#
Dimension Value Loading ImprovementsDetails
Product Component
Metrics Catalog
More Detail
The number of values for a particular dimension could be very large and therefore expensive to surface, so I'd like to mension (๐) two improvements that we made that should help speed the requests up.
- Caching dimension values in our results cache - Our results cache now saves these values after the first time you load them, so they'll be much quicker to load on the second attempt.
- Materializing dimension values - If you list a dimension to be materialized with your metrics in Materializations, the materialization can be used to retrieve the dimension values quickly.
It is preferred that you materialize the dimensions that are most important to you which will also ensure that the initial load time of these dimensions in the UI is performant. However, if you aren't using materializations, you can still benefit from the speed from the results cache on the second run.
Verification Steps
Results cache
- Choose a filter in the UI on any metric for the first time, load a set of dimension and corresponding dimension values and estimate the timing
- Reload the page and confirm the load time is faster.
Materializations
- Create a materializations config with metrics and dimensions
- Filter by dimensions in the UI to ensure they are loading in a performant way.
#
๐ Bug Fixes ๐#
Email Capitalization BugDetails
Product Component
Metrics Catalog
More Detail
We fixed an issue where a user created in the Transform organization that had capital letters in the email was not showing up properly in the ownership section in the Metrics Catalog.
Verification Steps
Confirm that any users with capital letters in their email are properly be added as owners to metrics.
#
Homepage shows last available dataDetails
Product Component
Metrics Catalog
More Detail
The homepage will now show the last 30 or 90 days of available data for metrics. Specifically, for "Popular Metrics", we show the last 30 days available. For "Your most viewed metrics", we show 90. Previously, it showed the last 30/90 days respectively, so metrics that did not have a daily time series returned no data.
Verification Steps
View the homepage to confirm that all your metrics are populating regardless of the frequency of data.
#
Annotations and Questions now preserve line breaksDetails
Product Component
Metrics Catalog
More Detail
Annotations and Question text now support line breaks.
Verification Steps
Create annotations and questions that include spaces and ensure you have line breaks between them when you submit it.