Skip to content

Latest commit

 

History

History
235 lines (172 loc) · 15.7 KB

CHANGELOG.md

File metadata and controls

235 lines (172 loc) · 15.7 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.140.0] - 2023-01-12

Breaking Changes

  • Result layout is changing from one row per metric/null dimension valued pair to one row per null dimension value regardless of number of metrics in the query. This only affects queries for multiple metrics where the requested dimensions contain null values. See the description on the relevant PR for more detailed information and an example illustrating how the output will change.
  • Updates to the required SqlClient protocol could cause typechecking failures for users injecting a custom SqlClient implementation into the MetricFlowClient
  • Version minimum changes in SQLAlchemy and snowflake-sqlalchemy could cause dependency conflicts when installed in python environments with libraries requiring an older version of either of these dependencies.

Added

  • Support for derived metrics - users can now define metrics based on expressions that use other metrics in the model as inputs. For example usage, see the description in the initial PR (@WilliamDee)
  • Support for versioned dimension joins against a standard Slowly Changing Dimension snapshot table (SCD Type II dataset) - users can now define a data source representing a dimension-only data set with start and end time columns representing validitiy windows for the dimension values, and MetricFlow will automatically join measures to the valid row entry. For details on limitations and future steps please refer to the initial PR. Note we no longer use the primary key type, as support for a natural key type was added in a follow-up PR. (@tlento)
  • Support for percentile measure definitions (@kyleli626)
  • Support for querying metrics without grouping by dimensions (@WilliamDee)
  • Support for generating a MetricFlow model from a dbt cloud metric model (@QMalcolm)
  • A cancel_request API in the SQL client for canceling running queries, with the necessary support for SQL isolation levels and asynchronous query submission (@plypaul)
  • Support for passing in query tags for Snowflake queries (@plypaul)
  • DataFlowPlan optimization to reduce source table scans (@plypaul)
  • Internal API to enable developers to fetch joinable data source targets from an input data source (@courtneyholcomb)

Updated

  • Improved readability of validation error messages (@QMalcolm)
  • Made Postgres engine tests merge-blocking in CI to reduce cycle time on detecting engine-specific errors (@tlento)
  • Updated poetry and python versions in CI to align with our build process and verify all supported Python versions (@tlento)
  • Eliminated data source level primary time dimension requirement in cases where all measures have an aggregation time dimension set (@QMalcolm)
  • Extended support for typed values for bind parameters (@courtneyholcolm)
  • Removed the optional Python levenshtein package from build dependencies in order to streamline package version requirements (@plypaul)
  • Consolidated join validation logic to eliminate code duplication and speed development (@plypaul)
  • Factored join building logic out of DataflowToSqlQueryPlanBuilder to streamline development (@tlento)
  • Improved visibility on underlying errors thrown by sql client requests (@courtneyholcomb)
  • Updated SQLAlchemy and snowflake-sqlalchemy minimum version requirements to resolve a version incompatibility introduced with SQLAlchemy 1.4.42 (@tlento)
  • Added CI coverage for Databricks SQL Warehouse execution environments (@tlento)

Fixed

  • Resolved error encountered in Databricks whenever table rename methods were invoked (@courtneyholcomb)
  • Fixed bug with warehouse measure validation where an error would be inappropriately thrown when users with measure-specific agg_time_dimension configurations attempted to run the full validation suite (@WilliamDee)
  • Issue with parsing explain output for Databricks SQL warehouse configurations (@courtneyholcomb)
  • Floating point comparison errors in CI tests (@tlento)
  • Issue with incomplete time range constraint validation that could result in invalid queries(@plypaul)
  • Resolved GitHub upgrade warnings on use of deprecated APIs and node.js build versions (@tlento)
  • Resolved python-levenshtein optimization warning on CLI startup (@jzhu13)
  • Resolved SQLAlchemy warning about the impending deprecation of the engine.table_names method (@Jstein77)
  • Improved error message for queries with time range constraints which were too narrow for the chosen time granularity (@kyleli626)
  • Eliminate SQL rendering error in BigQuery which would intermittently produce invalid GROUP BY specifications (@tlento)

[0.130.1] - 2022-10-19

Added

  • Support for overriding dbt profile and targets attributes when querying dbt models (@QMalcolm)
  • Validation to block use of DISTINCT keyword in COUNT aggregation expressions, as this can lead to incorrect results if optimized queries relying on partial aggregation attempt to do something like SUM(counts) to retrieve a less granular total value. (@tlento)

Updated

  • Made minor improvements to safeguards for internal development (@tlento)

[0.130.0] - 2022-10-18

Added

  • #292 This is the initial implementation of the MetricFlow dbt metrics integration. Allows MetricFlow to bootstrap itself natively from a dbt project that has metrics 🎉

Updated

  • Refactored the semantic layer to use the MetricReference object as opposed to MetricSpec (@WilliamDee)

[0.120.0] - 2022-10-13

Breaking Changes

  • Minor API change on SqlClient protocol could break existing API users writing custom SqlClient classes. MyPy should detect this issue. See the relevant PR for details.

Added

  • Support for Databricks! Now you can use Metricflow with your Databricks-backed warehouse! (@courtneyholcomb)
  • The ability to define constraints on input measures for ratio and expr metric types. This is a temporary quality of life improvement until full-featured derived metrics (i.e., metrics based on other metrics) are available. (@tlento)
  • Support for different time granularities, improved group by expression handling, and corrected constraint handling on semi-additive measures (@WilliamDee)
  • Support for count as a measure aggregation type. Note this is implemented as an alias around sum, so use of the DISTINCT keyword in expressions is not supported, and will be blocked via validation in a separate update. Users wishing for a COUNT(DISTINCT thing) equivalent should continue to use the count_distinct aggregation type. (@WilliamDee)

Fixed

  • Resolved incorrect constraint handling with semi-additive measures (@WilliamDee)
  • Eliminated Dataclass deserialization errors on default parameters (@tlento)

Updated

  • Optimized multi-hop join candidate selection (@plypaul)
  • Improved error handling and error messages on config validation (@QMalcolm, @tlento)
  • Streamlined our project README (@nhandel)
  • CLI now accepts metric-only queries in limited circumstances. See the assertion checks in the PR for details. We will announce this as a new feature when it is complete, but for the time being users may try it out to see if it meets their needs in its current form. (@WilliamDee)

[0.111.1] - 2022-08-30

Added

  • A lightweight Visual Studio Code extension for authoring configs with simple support for inline schema validation and auto-completion! Local repo changes limited to JSON schema generation. (@jack-transform)
  • Metric model template for Shopify metrics - if you use Shopify, this template can get you up and running for tracking your Shopify metrics! (@hesham-nawaz)

Fixed

  • Fixed warehouse validation failures caused by interaction with measure-specific aggregation times (@QMalcolm)
  • Resolved intermittent semantic validation failures due to unpicklable pydantic objects (@tlento)
  • Fixed edge case with semi-additive measures failing on certain join dimension connections (@WilliamDee)
  • Restructured semantic container depedencies to eliminate certain classes of circular import errors (@tlento)

Updated

  • Replaced Pydantic objects with serializable Dataclasses to improve plan building speed. This can reduce time to generate dataflow plans by 10-20x for complex queries. (@plypaul)
  • Refactored validation logic to make it easier to reason about (@QMalcolm)
  • Modified inference detection rules to make it more likely to classify low cardinality string columns as categorical dimensions (@tlento)

[0.111.0] - 2022-08-10

Added

  • Early beta for data source inference - Snowflake users can now run a command to bootstrap data source definitions based on warehouse metadata for tables in a given schema. Check out mf infer --help for more details. Feedback welcome! (@serramatutu)
  • Support for semi-additive measures - semi-additive measures are measures which can be aggregated across some dimensions, but not others. The most common use case for this is an end-of-period measure, such as a statement balance or end of day inventory hold. As of this release we support semi-additive restrictions bound by any time dimension. See the description on PR #183 for more details on usage. (@WilliamDee)
  • Expanded data warehouse validations - data warehoue validation runs will now check to ensure all measures, identifiers, and dimensions defined in data sources are queryable. (@QMalcolm)

Fixed

  • Resolved serialization error on custom Pydantic objects in the model parser (@tlento)
  • Cleaned up error message handling and missing test depencies on model validation (@tlento)
  • Eliminated a class of circular import errors by forking reference classes from the specs module (@WilliamDee)
  • Fixed error state when specifying a where constraint with metric_time (@plypaul)
  • Removed unused jsonschema element (@QMalcolm)

Updated

  • Updated the tutorial to use metric_time instead of arbitrary time dimensions (@plypaul)
  • Increased strictness of typechecking enforcement (@tlento)
  • Removed unnecessary "all time" WHERE clause rendering for cases where time constraints were not provided (@WilliamDee)
  • Updated Click version from ^8.1.3 to >=7.1.2 to temporarily resolve dependency issue for downstream Flask 1.1.4 usage (@jack-transform)
  • Updated Jinja2 version from 2.11.0 to >=2.11.0 to allow downstream Flask 1.1.4 users to update to 2.x.x (@jpreillymb, @tlento)

[0.110.1] - 2022-07-25

Fixed

  • Cleaned up package metadata and broken links in external README viewers (@tlento)
  • Fixed cases where output columns were rendering in the wrong order (@WilliamDee)

Updated

  • Improved model config schema validation to return all jsonschema errors instead of one at a time (@QMalcolm)
  • Streamlined rendered SQL to use BETWEEN expressions for date range checks (@WilliamDee)

[0.110.0] - 2022-07-21

Breaking Changes

  • Updated query inputs for time series dimensions to use metric_time instead of dimension names, since it is now possible for measures to have different time dimensions for time series aggregation. This also removes the restriction that all data sources have the same primary time dimension name. However, users issuing queries might experience exceptions if they are not using metric_time as their requested primary time dimension. (@plypaul)
  • Added enforcement for new reserved keyword metric_time (@tlento)
  • Reordered column output to time dimension, identifiers, dimensions, metrics, which could break automation relying on order-dependent parsing of CLI output. We encourage affected users to switch to using the API, and to access the resulting data frame with order-independent (i.e., by name) access to column values. (@WilliamDee)
  • Removed support for SQLite - expected impact is minimal as the repo has been cut to DuckDB for in memory testing (@plypaul)

Added

  • Support for specifying measure-specific time dimensions for time series aggregations (@plypaul)
  • Validation against use of SQL reserved keywords as element names, which previously would have resulted in SQL errors at query time (@QMalcolm)

Updated

  • Improved code structure around the model validation process (@QMalcolm)
  • Improved readability of model validation errors in CLI output (@QMalcolm)
  • Cleaned up DuckDB documentation (@yanghua)
  • Fixed edge case with model parsing where a constraint like ds = CURRENT_DATE() would throw an error (@tlento)
  • Restructured config parser to rely more on Pydantic's built in object parsing, allowing for more - and more standardized - customization on input types and parsing mechanics (@tlento)
  • Removed framework operation comments from SQL explain plans by default, added a flag to override (@WilliamDee, @nhandel)
  • Updated Click to 8.1.3 to resolve dependency conflicts and facilitate later addition of command completion (@jack-transform)
  • Improved developer documentation and workflows for PostgreSQL

[0.100.2] 2022-06-24

Updated

  • Updated numpy version to 1.23.0 to fix issues with operations on m1 macbooks (@serramatutu)
  • Downgraded DuckDB version to 0.3.4 to fix segfaults observed with multithreaded operations (@plypaul)
  • Added YAML linting to model validation process to catch syntax errors more explicitly (@QMalcolm)

[0.100.1] - 2022-06-23

Updated

  • Fixed CLI support for PostgreSQL (@plypaul)
  • Improved validation error messaging (@QMalcolm)

[0.100.0] - 2022-06-22

Breaking Changes

  • Updated MetricFlow config parameters for BigQuery users. See description on dbt-labs#62 for usage instructions.

Added

  • Metric / dimension SQL validations via DW engine (@QMalcolm)
  • Support for PostgreSQL and setup for local testing (@rexledesma)
  • Support for DuckDB (@plypaul)
  • Support for individual user logins to BigQuery (@WilliamDee)
  • Ability to create the MetricFlow client from a model in a specified directory (@WilliamDee)
  • Description and owner fields to model objects (@WilliamDee)

Updated

  • CLI tests without mocks (@WilliamDee)
  • Package dependencies to address security issues (@alliehowe)
  • Query cancellation behavior on CLI exit (@plypaul)

[0.93.0] - 2022-04-27

Added

  • Simple Developer API for interacting with MetricFlow engine based on a local config file for Warehouse credentials (@williamdee)
  • Config validation for Materialization structs (@lebca)
  • Config templates for useful metrics sourced from Salesforce data, for use by end users of MetricFlow (@JStein77)

[0.92.1] - 2022-04-13

Added

  • Ability to visualize DataFlow Plan from the command line via the --display-plans flag (@plypaul)

Fixed

  • Resolved BigQuery read credential failures on multi-line service account keys (@zzsza)
  • Resolved ciso8601 installation failures on Ubuntu (@plypaul)
  • Merge-blocking CI test failures and configuration errors (@marcodamore, @tlento)
  • Typing errors in MeasureReference (@lebca)

Removed

  • Remove legacy interfaces (@andykram)
  • Remove legacy time_format parameters from test models (@belindabennett)

Updated

  • Tutorial updates and extensions (@nhandel)
  • README improvements (@allegraholland, @belindabennett, @lebca, @tlento)
  • Contributor guide (@tlento)
  • CLI versioning (@williamdee)
  • CLI dependency restructuring in preparation for API extensions (@williamdee)

Special thanks

Special thanks to @zzsza for the quick fix for our BigQuery token parsing bug!