From 91bb0fb2964e75c8fc5f7e73825ff19e6ed1e760 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 30 May 2024 18:47:14 -0700 Subject: [PATCH 01/15] /* PR_START p--py312 04 */ Add assertion for intergration tests to verify a table was returned. --- tests_metricflow/integration/test_configured_cases.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests_metricflow/integration/test_configured_cases.py b/tests_metricflow/integration/test_configured_cases.py index dab436efb5..c0e457bedf 100644 --- a/tests_metricflow/integration/test_configured_cases.py +++ b/tests_metricflow/integration/test_configured_cases.py @@ -360,4 +360,5 @@ def test_case( ) ) # If we sort, it's effectively not checking the order whatever order that the output was would be overwritten. + assert actual is not None, "Did not get a result table from MetricFlow" assert_dataframes_equal(actual, expected, sort_columns=not case.check_order, allow_empty=case.allow_empty) From b2914449e27a356c9b16ab1f0f224fb559138158 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 30 May 2024 18:47:55 -0700 Subject: [PATCH 02/15] Use `.text_format()` for data table to string conversion. --- .../query_output/test_cumulative_metrics.py | 10 +++++----- .../integration/query_output/test_fill_nulls_with_0.py | 10 +++++----- .../query_output/test_metric_filter_output.py | 4 ++-- .../integration/query_output/test_offset_metrics.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests_metricflow/integration/query_output/test_cumulative_metrics.py b/tests_metricflow/integration/query_output/test_cumulative_metrics.py index a09e051b2a..5d54d50bf7 100644 --- a/tests_metricflow/integration/query_output/test_cumulative_metrics.py +++ b/tests_metricflow/integration/query_output/test_cumulative_metrics.py @@ -36,7 +36,7 @@ def test_simple_cumulative_metric( request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -64,7 +64,7 @@ def test_multiple_cumulative_metrics( request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -92,7 +92,7 @@ def test_non_additive_cumulative_metric( request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -120,7 +120,7 @@ def test_grain_to_date_cumulative_metric( request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -154,6 +154,6 @@ def test_cumulative_metric_with_non_adjustable_filter( request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) diff --git a/tests_metricflow/integration/query_output/test_fill_nulls_with_0.py b/tests_metricflow/integration/query_output/test_fill_nulls_with_0.py index 60ed835d01..3847b3d572 100644 --- a/tests_metricflow/integration/query_output/test_fill_nulls_with_0.py +++ b/tests_metricflow/integration/query_output/test_fill_nulls_with_0.py @@ -34,7 +34,7 @@ def test_simple_fill_nulls_with_0_metric_time( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -61,7 +61,7 @@ def test_simple_fill_nulls_with_0_month( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -88,7 +88,7 @@ def test_simple_join_to_time_spine( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -115,7 +115,7 @@ def test_fill_nulls_with_0_multi_metric_query( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -140,6 +140,6 @@ def test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension( # noq request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) diff --git a/tests_metricflow/integration/query_output/test_metric_filter_output.py b/tests_metricflow/integration/query_output/test_metric_filter_output.py index 2c8868604e..eb51b81b16 100644 --- a/tests_metricflow/integration/query_output/test_metric_filter_output.py +++ b/tests_metricflow/integration/query_output/test_metric_filter_output.py @@ -31,7 +31,7 @@ def test_query_with_simple_metric_in_where_filter( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -57,6 +57,6 @@ def test_metric_with_metric_in_where_filter( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) diff --git a/tests_metricflow/integration/query_output/test_offset_metrics.py b/tests_metricflow/integration/query_output/test_offset_metrics.py index 0e1c793a52..d51b3f76b4 100644 --- a/tests_metricflow/integration/query_output/test_offset_metrics.py +++ b/tests_metricflow/integration/query_output/test_offset_metrics.py @@ -30,7 +30,7 @@ def test_offset_to_grain_with_single_granularity( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) @@ -55,6 +55,6 @@ def test_offset_to_grain_with_multiple_granularities( # noqa: D103 request=request, mf_test_configuration=mf_test_configuration, snapshot_id="query_output", - snapshot_str=query_result.result_df.to_string(), + snapshot_str=query_result.result_df.text_format(), sql_engine=sql_client.sql_engine_type, ) From e464d7425cfd902e9cad500893b160834c678346 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Mon, 27 May 2024 18:00:33 -0700 Subject: [PATCH 03/15] Migrate various uses of dataframes to the data table. --- .../dbt_connectors/adapter_backed_client.py | 14 +++-- metricflow/engine/metricflow_engine.py | 22 ++----- metricflow/execution/execution_plan.py | 4 +- metricflow/protocols/sql_client.py | 4 +- tests_metricflow/compare_df.py | 41 ++++-------- tests_metricflow/execution/test_tasks.py | 14 ++--- .../sql_clients/adapter_backed_ddl_client.py | 47 +++++++------- .../fixtures/sql_clients/ddl_sql_client.py | 5 +- .../inference/context/test_snowflake.py | 62 ++++++++++--------- .../plan_conversion/test_time_spine.py | 29 +++++---- .../sql_clients/test_date_time_operations.py | 42 ++++++------- .../sql_clients/test_sql_client.py | 36 +++++------ 12 files changed, 144 insertions(+), 176 deletions(-) diff --git a/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py b/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py index 0ae19f3ed7..39e524071e 100644 --- a/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py +++ b/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py @@ -4,7 +4,6 @@ import logging import time -import pandas as pd from dbt.adapters.base.impl import BaseAdapter from dbt.exceptions import DbtDatabaseError from dbt_semantic_interfaces.enum_extension import assert_values_exhausted @@ -14,6 +13,7 @@ from metricflow_semantics.random_id import random_id from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlEngine from metricflow.sql.render.big_query import BigQuerySqlQueryPlanRenderer from metricflow.sql.render.databricks import DatabricksSqlQueryPlanRenderer @@ -127,7 +127,7 @@ def query( self, stmt: str, sql_bind_parameters: SqlBindParameters = SqlBindParameters(), - ) -> pd.DataFrame: + ) -> MetricFlowDataTable: """Query statement; result expected to be data which will be returned as a DataFrame. Args: @@ -150,10 +150,14 @@ def query( logger.info(f"Query returned from dbt Adapter with response {result[0]}") agate_data = result[1] - df = pd.DataFrame([row.values() for row in agate_data.rows], columns=agate_data.column_names) + rows = [row.values() for row in agate_data.rows] + data_table = MetricFlowDataTable.create_from_rows( + column_names=agate_data.column_names, + rows=rows, + ) stop = time.time() - logger.info(f"Finished running the query in {stop - start:.2f}s with {df.shape[0]} row(s) returned") - return df + logger.info(f"Finished running the query in {stop - start:.2f}s with {data_table.row_count} row(s) returned") + return data_table def execute( self, diff --git a/metricflow/engine/metricflow_engine.py b/metricflow/engine/metricflow_engine.py index b4f1a75748..19b7a2c654 100644 --- a/metricflow/engine/metricflow_engine.py +++ b/metricflow/engine/metricflow_engine.py @@ -7,7 +7,6 @@ from enum import Enum from typing import List, Optional, Sequence, Tuple -import pandas as pd from dbt_semantic_interfaces.implementations.elements.dimension import PydanticDimensionTypeParams from dbt_semantic_interfaces.implementations.filters.where_filter import PydanticWhereFilter from dbt_semantic_interfaces.references import EntityReference, MeasureReference, MetricReference @@ -35,6 +34,7 @@ from metricflow_semantics.specs.spec_set import InstanceSpecSet from metricflow_semantics.time.time_source import TimeSource +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder from metricflow.dataflow.builder.node_data_set import DataflowPlanNodeOutputDataSetResolver from metricflow.dataflow.builder.source_node import SourceNodeBuilder @@ -160,7 +160,7 @@ class MetricFlowQueryResult: query_spec: MetricFlowQuerySpec dataflow_plan: DataflowPlan sql: str - result_df: Optional[pd.DataFrame] = None + result_df: Optional[MetricFlowDataTable] = None result_table: Optional[SqlTable] = None @@ -703,7 +703,7 @@ def get_dimension_values( # noqa: D102 time_constraint_end: Optional[datetime.datetime] = None, ) -> List[str]: # Run query - query_result = self.query( + query_result: MetricFlowQueryResult = self.query( MetricFlowQueryRequest.create_with_random_request_id( metric_names=metric_names, group_by_names=[get_group_by_values], @@ -712,22 +712,10 @@ def get_dimension_values( # noqa: D102 query_type=MetricFlowQueryType.DIMENSION_VALUES, ) ) - result_dataframe = query_result.result_df - if result_dataframe is None: + if query_result.result_df is None: return [] - # Snowflake likes upper-casing things in result output, so we lower-case all names - # before operating on the dataframe. - metric_names = [metric_name.lower() for metric_name in metric_names] - result_dataframe.columns = result_dataframe.columns.str.lower() - - # Get dimension values regardless of input name -> output dimension mapping. This is necessary befcause - # granularity adjustments on time dimensions produce different output names for dimension values. - # Note: this only works as long as we have exactly one column of group by values - # and no other extraneous output columns - dim_vals = result_dataframe[result_dataframe.columns[~result_dataframe.columns.isin(metric_names)]].iloc[:, 0] - - return sorted([str(val) for val in dim_vals]) + return sorted([str(val) for val in query_result.result_df.column_values_iterator(0)]) @log_call(module_name=__name__, telemetry_reporter=_telemetry_reporter) def explain_get_dimension_values( # noqa: D102 diff --git a/metricflow/execution/execution_plan.py b/metricflow/execution/execution_plan.py index 0f03c25834..1664a14339 100644 --- a/metricflow/execution/execution_plan.py +++ b/metricflow/execution/execution_plan.py @@ -6,12 +6,12 @@ from dataclasses import dataclass from typing import List, Optional, Sequence, Tuple -import pandas as pd from metricflow_semantics.dag.id_prefix import IdPrefix, StaticIdPrefix from metricflow_semantics.dag.mf_dag import DagId, DagNode, DisplayedProperty, MetricFlowDag, NodeId from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters from metricflow_semantics.visitor import Visitable +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient from metricflow.sql.sql_table import SqlTable @@ -83,7 +83,7 @@ class TaskExecutionResult: sql: Optional[str] = None bind_params: Optional[SqlBindParameters] = None # If the task produces a dataframe as a result, it's stored here. - df: Optional[pd.DataFrame] = None + df: Optional[MetricFlowDataTable] = None class SelectSqlQueryToDataFrameTask(ExecutionPlanTask): diff --git a/metricflow/protocols/sql_client.py b/metricflow/protocols/sql_client.py index 06ca36b350..e553026315 100644 --- a/metricflow/protocols/sql_client.py +++ b/metricflow/protocols/sql_client.py @@ -5,8 +5,8 @@ from typing import Protocol from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters -from pandas import DataFrame +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.sql.render.sql_plan_renderer import SqlQueryPlanRenderer @@ -52,7 +52,7 @@ def query( self, stmt: str, sql_bind_parameters: SqlBindParameters = SqlBindParameters(), - ) -> DataFrame: + ) -> MetricFlowDataTable: """Base query method, upon execution will run a query that returns a pandas DataFrame.""" raise NotImplementedError diff --git a/tests_metricflow/compare_df.py b/tests_metricflow/compare_df.py index ce34fbd419..d9f6a0ff7d 100644 --- a/tests_metricflow/compare_df.py +++ b/tests_metricflow/compare_df.py @@ -6,6 +6,9 @@ import pandas as pd +from metricflow.data_table.mf_table import MetricFlowDataTable +from tests_metricflow.sql.compare_data_table import check_data_tables_are_equal + logger = logging.getLogger(__name__) @@ -43,8 +46,8 @@ def _dataframes_contain_same_data( def assert_dataframes_equal( - actual: pd.DataFrame, - expected: pd.DataFrame, + actual: MetricFlowDataTable, + expected: MetricFlowDataTable, sort_columns: bool = True, allow_empty: bool = False, compare_names_using_lowercase: bool = False, @@ -55,30 +58,10 @@ def assert_dataframes_equal( If compare_names_using_lowercase is set to True, we copy the dataframes and lower-case their names. This is useful for Snowflake query output comparisons. """ - if compare_names_using_lowercase: - actual = actual.copy() - expected = expected.copy() - actual.columns = actual.columns.str.lower() - expected.columns = expected.columns.str.lower() - - if set(actual.columns) != set(expected.columns): - raise ValueError( - f"DataFrames do not contain the same columns. actual: {set(actual.columns)}, " - f"expected: {set(expected.columns)}" - ) - - if not allow_empty and actual.shape[0] == 0 and expected.shape[0] == 0: - raise AssertionError("Both dataframes have no rows; likely there is a mistake with the test") - - if sort_columns: - sort_by = list(sorted(actual.columns.tolist())) - expected = expected.loc[:, sort_by].sort_values(sort_by).reset_index(drop=True) - actual = actual.loc[:, sort_by].sort_values(sort_by).reset_index(drop=True) - - if not _dataframes_contain_same_data(actual=actual, expected=expected): - raise ValueError( - f"Dataframes not equal.\n" - f"Expected:\n{expected.to_markdown(index=False)}" - "\n---\n" - f"Actual:\n{actual.to_markdown(index=False)}" - ) + check_data_tables_are_equal( + expected_table=expected, + actual_table=actual, + ignore_order=sort_columns, + allow_empty=allow_empty, + compare_column_names_using_lowercase=compare_names_using_lowercase, + ) diff --git a/tests_metricflow/execution/test_tasks.py b/tests_metricflow/execution/test_tasks.py index 4ee893e5d3..fe0c39010e 100644 --- a/tests_metricflow/execution/test_tasks.py +++ b/tests_metricflow/execution/test_tasks.py @@ -1,11 +1,11 @@ from __future__ import annotations -import pandas as pd from metricflow_semantics.dag.mf_dag import DagId from metricflow_semantics.random_id import random_id from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.execution.execution_plan import ( ExecutionPlan, SelectSqlQueryToDataFrameTask, @@ -29,9 +29,9 @@ def test_read_sql_task(sql_client: SqlClient) -> None: # noqa: D103 assert_dataframes_equal( actual=task_result.df, - expected=pd.DataFrame( - columns=["foo"], - data=[(1,)], + expected=MetricFlowDataTable.create_from_rows( + column_names=["foo"], + rows=[(1,)], ), compare_names_using_lowercase=sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, ) @@ -55,9 +55,9 @@ def test_write_table_task( # noqa: D103 assert_dataframes_equal( actual=sql_client.query(f"SELECT * FROM {output_table.sql}"), - expected=pd.DataFrame( - columns=["foo"], - data=[(1,)], + expected=MetricFlowDataTable.create_from_rows( + column_names=["foo"], + rows=[(1,)], ), compare_names_using_lowercase=sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, ) diff --git a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py index c2882f7e0d..737a92c9e6 100644 --- a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py +++ b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py @@ -1,12 +1,13 @@ from __future__ import annotations +import datetime import logging import time from typing import Optional -import pandas as pd - from dbt_metricflow.cli.dbt_connectors.adapter_backed_client import AdapterBackedSqlClient +from metricflow.data_table.mf_column import ColumnDescription +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlEngine from metricflow.sql.sql_table import SqlTable @@ -19,7 +20,7 @@ class AdapterBackedDDLSqlClient(AdapterBackedSqlClient): def create_table_from_dataframe( self, sql_table: SqlTable, - df: pd.DataFrame, + df: MetricFlowDataTable, chunk_size: Optional[int] = None, ) -> None: """Create a table in the data warehouse containing the contents of the dataframe. @@ -31,21 +32,16 @@ def create_table_from_dataframe( df: The Pandas DataFrame object containing the column schema and data to load chunk_size: The number of rows to insert per transaction """ - logger.info(f"Creating table '{sql_table.sql}' from a DataFrame with {df.shape[0]} row(s)") + logger.info(f"Creating table '{sql_table.sql}' from a DataFrame with {df.row_count} row(s)") start_time = time.time() + with self._adapter.connection_named("MetricFlow_create_from_dataframe"): # Create table - # update dtypes to convert None to NA in boolean columns. - # This mirrors the SQLAlchemy schema detection logic in pandas.io.sql - df = df.convert_dtypes() - columns = df.columns - columns_to_insert = [] - for i in range(len(df.columns)): + for column_description in df.column_descriptions: # Format as "column_name column_type" - columns_to_insert.append( - f"{columns[i]} {self._get_type_from_pandas_dtype(str(df[columns[i]].dtype).lower())}" - ) + columns_to_insert.append(f"{column_description.column_name} {self._get_sql_type(column_description)}") + self._adapter.execute( f"CREATE TABLE IF NOT EXISTS {sql_table.sql} ({', '.join(columns_to_insert)})", auto_begin=True, @@ -55,18 +51,18 @@ def create_table_from_dataframe( # Insert rows values = [] - for row in df.itertuples(index=False, name=None): + for row in df.rows: cells = [] for cell in row: - if pd.isnull(cell): + if cell is None: # use null keyword instead of isNA/None/etc. cells.append("null") - elif type(cell) in [str, pd.Timestamp]: + elif type(cell) in [str, datetime.datetime]: # Wrap cell in quotes & escape existing single quotes escaped_cell = self._quote_escape_value(str(cell)) # Trino requires timestamp literals to be wrapped in a timestamp() function. # There is probably a better way to handle this. - if self.sql_engine_type is SqlEngine.TRINO and type(cell) is pd.Timestamp: + if self.sql_engine_type is SqlEngine.TRINO and type(cell) is datetime.datetime: cells.append(f"timestamp '{escaped_cell}'") else: cells.append(f"'{escaped_cell}'") @@ -88,30 +84,31 @@ def create_table_from_dataframe( # Commit all insert transaction at once self._adapter.commit_if_has_connection() - logger.info(f"Created table '{sql_table.sql}' from a DataFrame in {time.time() - start_time:.2f}s") + logger.info(f"Created SQL table '{sql_table.sql}' from an in-memory table in {time.time() - start_time:.2f}s") - def _get_type_from_pandas_dtype(self, dtype: str) -> str: + def _get_sql_type(self, column_description: ColumnDescription) -> str: """Helper method to get the engine-specific type value. The dtype dict here is non-exhaustive but should be adequate for our needs. """ # TODO: add type handling for string/bool/bigint types for all engines - if dtype == "string" or dtype == "object": + column_type = column_description.column_type + if column_type is str: if self.sql_engine_type is SqlEngine.DATABRICKS or self.sql_engine_type is SqlEngine.BIGQUERY: return "string" if self.sql_engine_type is SqlEngine.TRINO: return "varchar" return "text" - elif dtype == "boolean" or dtype == "bool": + elif column_type is bool: return "boolean" - elif dtype == "int64": + elif column_type is int: return "bigint" - elif dtype == "float64": + elif column_type is float: return self._sql_query_plan_renderer.expr_renderer.double_data_type - elif dtype == "datetime64[ns]": + elif column_type is datetime.datetime: return self._sql_query_plan_renderer.expr_renderer.timestamp_data_type else: - raise ValueError(f"Encountered unexpected Pandas dtype ({dtype})!") + raise ValueError(f"Encountered unexpected {column_type=}!") def _quote_escape_value(self, value: str) -> str: """Escape single quotes in string-like values for create_table_from_dataframe. diff --git a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py index f877a8c433..f20b071305 100644 --- a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py +++ b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py @@ -3,8 +3,7 @@ from abc import abstractmethod from typing import Optional, Protocol -from pandas import DataFrame - +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient from metricflow.sql.sql_table import SqlTable @@ -24,7 +23,7 @@ class SqlClientWithDDLMethods(SqlClient, Protocol): def create_table_from_dataframe( self, sql_table: SqlTable, - df: DataFrame, + df: MetricFlowDataTable, chunk_size: Optional[int] = None, ) -> None: """Creates a table and populates it with the contents of the dataframe. diff --git a/tests_metricflow/inference/context/test_snowflake.py b/tests_metricflow/inference/context/test_snowflake.py index a07264e349..6e8ca4b859 100644 --- a/tests_metricflow/inference/context/test_snowflake.py +++ b/tests_metricflow/inference/context/test_snowflake.py @@ -1,10 +1,11 @@ from __future__ import annotations +import itertools import json +from typing import Dict, List, Union from unittest.mock import MagicMock -import pandas as pd - +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.inference.context.data_warehouse import ( ColumnProperties, DataWarehouseInferenceContext, @@ -57,33 +58,36 @@ def test_context_provider() -> None: """ # See for SHOW COLUMNS result dataframe spec: # https://docs.snowflake.com/en/sql-reference/sql/show-columns.html - show_columns_result = pd.DataFrame( - { - "column_name": ["INTCOL", "STRCOL"], - "schema_name": ["SCHEMA", "SCHEMA"], - "table_name": ["TABLE", "TABLE"], - "database_name": ["DB", "DB"], - "data_type": [ - json.dumps({"type": "FIXED", "nullable": False}), - json.dumps({"type": "TEXT", "nullable": True}), - ], - } - ) - stats_result = pd.DataFrame( - { - "intcol_countdistinct": [10], - "intcol_min": [0], - "intcol_max": [10], - "intcol_countnull": [0], - "strcol_countdistinct": [40], - "strcol_min": ["aaaa"], - "strcol_max": ["zzzz"], - "strcol_countnull": [10], - "rowcount": [50], - } + show_columns_result_dict: Dict[str, List[Union[int, str]]] = { + "column_name": ["INTCOL", "STRCOL"], + "schema_name": ["SCHEMA", "SCHEMA"], + "table_name": ["TABLE", "TABLE"], + "database_name": ["DB", "DB"], + "data_type": [ + json.dumps({"type": "FIXED", "nullable": False}), + json.dumps({"type": "TEXT", "nullable": True}), + ], + } + show_columns_result = MetricFlowDataTable.create_from_rows( + column_names=tuple(show_columns_result_dict.keys()), + rows=tuple(itertools.zip_longest(*show_columns_result_dict.values())), + ) + stats_result_dict: Dict[str, List[Union[int, str]]] = { + "intcol_countdistinct": [10], + "intcol_min": [0], + "intcol_max": [10], + "intcol_countnull": [0], + "strcol_countdistinct": [40], + "strcol_min": ["aaaa"], + "strcol_max": ["zzzz"], + "strcol_countnull": [10], + "rowcount": [50], + } + stats_result = MetricFlowDataTable.create_from_rows( + column_names=tuple(stats_result_dict.keys()), + rows=tuple(itertools.zip_longest(*stats_result_dict.values())), ) - client = MagicMock() client.query = MagicMock() client.query.side_effect = [show_columns_result, stats_result] @@ -108,8 +112,8 @@ def test_context_provider() -> None: distinct_row_count=10, is_nullable=False, null_count=0, - min_value=0, - max_value=10, + min_value="0", + max_value="10", ), ColumnProperties( column=SqlColumn.from_string("db.schema.table.strcol"), diff --git a/tests_metricflow/plan_conversion/test_time_spine.py b/tests_metricflow/plan_conversion/test_time_spine.py index 443922519e..fffbc10b68 100644 --- a/tests_metricflow/plan_conversion/test_time_spine.py +++ b/tests_metricflow/plan_conversion/test_time_spine.py @@ -1,9 +1,9 @@ from __future__ import annotations +import textwrap + from metricflow_semantics.filters.time_constraint import TimeRangeConstraint from metricflow_semantics.model.semantic_manifest_lookup import SemanticManifestLookup -from metricflow_semantics.time.time_constants import ISO8601_PYTHON_TS_FORMAT -from pandas import DataFrame from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient @@ -15,18 +15,17 @@ def test_date_spine_date_range( # noqa: D103 create_source_tables: None, ) -> None: time_spine_source = TimeSpineSource.create_from_manifest(simple_semantic_manifest_lookup.semantic_manifest) - range_df: DataFrame = sql_client.query( - f"""\ - SELECT - MIN({time_spine_source.time_column_name}) - , MAX({time_spine_source.time_column_name}) - FROM {time_spine_source.spine_table.sql} - """, + range_df = sql_client.query( + textwrap.dedent( + f"""\ + SELECT + MIN({time_spine_source.time_column_name}) + , MAX({time_spine_source.time_column_name}) + FROM {time_spine_source.spine_table.sql} + """, + ) ) - assert range_df.shape == (1, 2), f"Expected 1 row with 2 columns in range dataframe, got {range_df}" - date_range = tuple(range_df.squeeze()) - assert tuple(map(lambda x: x.strftime(ISO8601_PYTHON_TS_FORMAT), date_range)) == ( - TimeRangeConstraint.ALL_TIME_BEGIN().strftime(ISO8601_PYTHON_TS_FORMAT), - TimeRangeConstraint.ALL_TIME_END().strftime(ISO8601_PYTHON_TS_FORMAT), - ) + assert range_df.row_count == 1 + assert range_df.column_count == 2 + assert range_df.rows[0] == (TimeRangeConstraint.ALL_TIME_BEGIN(), TimeRangeConstraint.ALL_TIME_END()) diff --git a/tests_metricflow/sql_clients/test_date_time_operations.py b/tests_metricflow/sql_clients/test_date_time_operations.py index f3fdc89c4c..5e96499b4b 100644 --- a/tests_metricflow/sql_clients/test_date_time_operations.py +++ b/tests_metricflow/sql_clients/test_date_time_operations.py @@ -16,14 +16,15 @@ from __future__ import annotations +import datetime import logging from typing import Any -import pandas as pd import pytest from dbt_semantic_interfaces.type_enums.date_part import DatePart from metricflow_semantics.time.time_granularity import TimeGranularity +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient from metricflow.sql.sql_exprs import ( SqlCastToTimestampExpression, @@ -35,16 +36,11 @@ logger = logging.getLogger(__name__) -def _extract_dataframe_value(df: pd.DataFrame) -> Any: # type: ignore[misc] +def _extract_dataframe_value(df: MetricFlowDataTable) -> Any: # type: ignore[misc] """Helper to assert that a query result has a single value, and return the value from the dataframe.""" - assert df.shape == ( - 1, - 1, - ), f"Invalid dataframe, expected exactly one Timestamp value but got {df.to_markdown(index=False)}!" - for col in df.select_dtypes(["datetimetz"]): - # Remove time zone information if the engine includes it by default, because weird stuff happens there. - df[col] = df[col].dt.tz_localize(None) - return df.iloc[0, 0] + assert df.row_count == 1 + assert df.column_count == 1 + return df.get_cell_value(0, 0) def _build_date_trunc_expression(date_string: str, time_granularity: TimeGranularity) -> SqlDateTruncExpression: @@ -61,27 +57,27 @@ def test_date_trunc_to_year(sql_client: SqlClient) -> None: """ # The ISO year start for 2015 is 2014-12-29, but we should always get 2015-01-01 ISO_DATE_STRING = "2015-06-15" - expected = pd.Timestamp(year=2015, month=1, day=1) + expected = datetime.datetime(year=2015, month=1, day=1) date_trunc_stmt = sql_client.sql_query_plan_renderer.expr_renderer.render_sql_expr( _build_date_trunc_expression(date_string=ISO_DATE_STRING, time_granularity=TimeGranularity.YEAR) ).sql df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = pd.Timestamp(_extract_dataframe_value(df=df)) + actual = _extract_dataframe_value(df=df) assert expected == actual @pytest.mark.parametrize( ("input", "expected"), ( - ("2015-02-22", pd.Timestamp(year=2015, month=1, day=1)), - ("2015-06-30", pd.Timestamp(year=2015, month=4, day=1)), - ("2015-07-01", pd.Timestamp(year=2015, month=7, day=1)), - ("2015-11-17", pd.Timestamp(year=2015, month=10, day=1)), + ("2015-02-22", datetime.datetime(year=2015, month=1, day=1)), + ("2015-06-30", datetime.datetime(year=2015, month=4, day=1)), + ("2015-07-01", datetime.datetime(year=2015, month=7, day=1)), + ("2015-11-17", datetime.datetime(year=2015, month=10, day=1)), ), ) -def test_date_trunc_to_quarter(sql_client: SqlClient, input: str, expected: pd.Timestamp) -> None: +def test_date_trunc_to_quarter(sql_client: SqlClient, input: str, expected: datetime.datetime) -> None: """Tests default date trunc behavior to quarterly boundaries. This should generally pin to the first day of the "natural" yearly quarters, for example, @@ -93,19 +89,19 @@ def test_date_trunc_to_quarter(sql_client: SqlClient, input: str, expected: pd.T df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = pd.Timestamp(_extract_dataframe_value(df=df)) + actual = _extract_dataframe_value(df=df) assert expected == actual @pytest.mark.parametrize( ("input", "expected"), ( - ("2023-10-08", pd.Timestamp(year=2023, month=10, day=2)), # Sunday -> preceding Monday - ("2023-10-02", pd.Timestamp(year=2023, month=10, day=2)), # Monday truncates to itself - ("2023-09-01", pd.Timestamp(year=2023, month=8, day=28)), # Weekday -> preceding Monday + ("2023-10-08", datetime.datetime(year=2023, month=10, day=2)), # Sunday -> preceding Monday + ("2023-10-02", datetime.datetime(year=2023, month=10, day=2)), # Monday truncates to itself + ("2023-09-01", datetime.datetime(year=2023, month=8, day=28)), # Weekday -> preceding Monday ), ) -def test_date_trunc_to_week(sql_client: SqlClient, input: str, expected: pd.Timestamp) -> None: +def test_date_trunc_to_week(sql_client: SqlClient, input: str, expected: datetime.datetime) -> None: """Tests date trunc behavior to verify that a date_trunc to WEEK returns the date for MONDAY. This is needed because some engines default to Monday and some default to Sunday for their week start. @@ -117,7 +113,7 @@ def test_date_trunc_to_week(sql_client: SqlClient, input: str, expected: pd.Time df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = pd.Timestamp(_extract_dataframe_value(df=df)) + actual = _extract_dataframe_value(df=df) assert expected == actual diff --git a/tests_metricflow/sql_clients/test_sql_client.py b/tests_metricflow/sql_clients/test_sql_client.py index 241886f47d..dab3b062ca 100644 --- a/tests_metricflow/sql_clients/test_sql_client.py +++ b/tests_metricflow/sql_clients/test_sql_client.py @@ -3,12 +3,13 @@ import logging from typing import Set, Union -import pandas as pd import pytest +from dbt_semantic_interfaces.test_utils import as_datetime from metricflow_semantics.random_id import random_id from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient, SqlEngine from metricflow.sql.sql_table import SqlTable from tests_metricflow.compare_df import assert_dataframes_equal @@ -25,17 +26,14 @@ def _select_x_as_y(x: int = 1, y: str = "y") -> str: return f"SELECT {x} AS {y}" -def _check_1col(df: pd.DataFrame, col: str = "y", vals: Set[Union[int, str]] = {1}) -> None: +def _check_1col(df: MetricFlowDataTable, col: str = "y", vals: Set[Union[int, str]] = {1}) -> None: """Helper to check that 1 column has the same value and a case-insensitive matching name. We lower-case the names due to snowflake's tendency to capitalize things. This isn't ideal but it'll do for now. """ - df.columns = df.columns.str.lower() - col = col.lower() - assert isinstance(df, pd.DataFrame) - assert df.shape == (len(vals), 1) - assert df.columns.tolist() == [col] - assert set(df[col]) == vals + assert df.column_count == 1 + assert df.column_names == (col,) + assert set(df.column_values_iterator(0)) == vals def test_query(sql_client: SqlClient) -> None: # noqa: D103 @@ -52,14 +50,14 @@ def test_select_one_query(sql_client: SqlClient) -> None: # noqa: D103 def test_create_table_from_dataframe( # noqa: D103 mf_test_configuration: MetricFlowTestConfiguration, ddl_sql_client: SqlClientWithDDLMethods ) -> None: - expected_df = pd.DataFrame( - columns=["int_col", "str_col", "float_col", "bool_col", "time_col"], - data=[ - (1, "abc", 1.23, False, "2020-01-01"), - (2, "def", 4.56, True, "2020-01-02"), + expected_df = MetricFlowDataTable.create_from_rows( + column_names=["int_col", "str_col", "float_col", "bool_col", "time_col"], + rows=[ + (1, "abc", 1.23, False, as_datetime("2020-01-01")), + (2, "def", 4.56, True, as_datetime("2020-01-02")), (3, "ghi", 1.1, False, None), # Test NaT type - (None, "jkl", None, True, "2020-01-03"), # Test NaN types - (3, None, 1.2, None, "2020-01-04"), # Test None types for NA conversions + (None, "jkl", None, True, as_datetime("2020-01-03")), # Test NaN types + (3, None, 1.2, None, as_datetime("2020-01-04")), # Test None types for NA conversions ], ) sql_table = SqlTable(schema_name=mf_test_configuration.mf_system_schema, table_name=_random_table()) @@ -82,11 +80,11 @@ def test_percent_signs_in_query(sql_client: SqlClient) -> None: @pytest.fixture() -def example_df() -> pd.DataFrame: +def example_df() -> MetricFlowDataTable: """Data frame containing data of different types for testing. DateTime would be good to add.""" - return pd.DataFrame( - columns=["int_col", "str_col", "float_col", "bool_col"], - data=[ + return MetricFlowDataTable.create_from_rows( + column_names=["int_col", "str_col", "float_col", "bool_col"], + rows=[ (1, "abc", 1.23, False), (2, "def", 4.56, True), ], From eeb57c17a70b0642e20e5fdc3056d577ac0df206 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 30 May 2024 18:46:40 -0700 Subject: [PATCH 04/15] Update `SqlTableSnapshot` to use `MetricFlowDataTable`. --- .../table_snapshot/table_snapshots.py | 16 ++++++++-------- .../table_snapshot/test_table_snapshots.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests_metricflow/table_snapshot/table_snapshots.py b/tests_metricflow/table_snapshot/table_snapshots.py index 4b2ccd2df5..c51de9e9d9 100644 --- a/tests_metricflow/table_snapshot/table_snapshots.py +++ b/tests_metricflow/table_snapshot/table_snapshots.py @@ -1,21 +1,21 @@ from __future__ import annotations -import datetime import logging import os from collections import OrderedDict from dataclasses import dataclass from enum import Enum from pathlib import Path -from typing import List, Optional, Sequence, Tuple, Union +from typing import List, Optional, Sequence, Tuple import dateutil.parser -import pandas as pd import yaml from dbt_semantic_interfaces.enum_extension import assert_values_exhausted from dbt_semantic_interfaces.implementations.base import FrozenBaseModel from metricflow_semantics.specs.spec_classes import hash_items +from metricflow.data_table.column_types import CellValue +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.sql.sql_table import SqlTable from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods @@ -90,14 +90,14 @@ def _parse_bool_str(bool_str: str) -> bool: raise RuntimeError(f"Invalid string representation of a boolean: {bool_str}") @property - def as_df(self) -> pd.DataFrame: + def as_df(self) -> MetricFlowDataTable: """Return this snapshot as represented by an equivalent dataframe.""" # In the YAML files, all values are strings, but they need to be converted to defined type so that it can be # properly represented in a dataframe type_converted_rows = [] for row in self.rows: - type_converted_row: List[Union[str, datetime.datetime, int, float, bool, None]] = [] + type_converted_row: List[CellValue] = [] for column_num, column_value in enumerate(row): column_type = self.column_definitions[column_num].type if column_value is None: @@ -116,9 +116,9 @@ def as_df(self) -> pd.DataFrame: assert_values_exhausted(column_type) type_converted_rows.append(type_converted_row) - return pd.DataFrame( - columns=[column_definition.name for column_definition in self.column_definitions], - data=type_converted_rows, + return MetricFlowDataTable.create_from_rows( + column_names=[column_definition.name for column_definition in self.column_definitions], + rows=type_converted_rows, ) diff --git a/tests_metricflow/table_snapshot/test_table_snapshots.py b/tests_metricflow/table_snapshot/test_table_snapshots.py index f9b89476af..1751b987ac 100644 --- a/tests_metricflow/table_snapshot/test_table_snapshots.py +++ b/tests_metricflow/table_snapshot/test_table_snapshots.py @@ -3,12 +3,12 @@ import os from pathlib import Path -import pandas as pd import pytest from dbt_semantic_interfaces.test_utils import as_datetime from metricflow_semantics.random_id import random_id from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlEngine from tests_metricflow.compare_df import assert_dataframes_equal from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods @@ -46,9 +46,9 @@ def test_as_df(table_snapshot: SqlTableSnapshot) -> None: """Check that SqlTableSnapshot.as_df works as expected.""" assert_dataframes_equal( actual=table_snapshot.as_df, - expected=pd.DataFrame( - columns=[f"col{i}" for i in range(5)], - data=( + expected=MetricFlowDataTable.create_from_rows( + column_names=[f"col{i}" for i in range(5)], + rows=( (True, 1, 1.0, as_datetime("2020-01-02"), "hi"), (False, -1, -1.0, as_datetime("2020-03-04 05:06:07"), "bye"), ), From 152b6cef94a8cc2b187f1cda0afdabb4785d6b81 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 8 May 2024 03:55:37 -0700 Subject: [PATCH 05/15] Update snapshots for new test-table format. --- .../BigQuery/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../DuckDB/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Postgres/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Redshift/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Trino/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 7 +- ...o_date_cumulative_metric__query_output.txt | 11 +- ...tiple_cumulative_metrics__query_output.txt | 127 ++++++------ ...ditive_cumulative_metric__query_output.txt | 9 +- ...simple_cumulative_metric__query_output.txt | 183 +++++++++--------- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...ith_0_multi_metric_query__query_output.txt | 83 ++++---- ...th_categorical_dimension__query_output.txt | 33 ++-- ...nulls_with_0_metric_time__query_output.txt | 83 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 51 ++--- ...imple_join_to_time_spine__query_output.txt | 83 ++++---- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_metric_in_where_filter__query_output.txt | 15 +- ...e_metric_in_where_filter__query_output.txt | 9 +- ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ ...h_multiple_granularities__query_output.txt | 127 ++++++------ ..._with_single_granularity__query_output.txt | 127 ++++++------ 126 files changed, 3549 insertions(+), 3451 deletions(-) diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt index 138d8b140e..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt index 7e7a1fea49..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt index 313b03eda8..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt index fc66131bbc..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt index d1e31bc2b6..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00+00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00+00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00+00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00+00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00+00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00+00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00+00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00+00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt index 8a835afbdb..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------------|----------------------------:| -| 2020-01-01 00:00:00+00:00 | 1000 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt index 7d7b0f5f46..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00+00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00+00:00 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt index 1f575ac83d..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00+00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00+00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00+00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00+00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00+00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt index dd02020ec6..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:-------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 | 5 | 1 | 0 | -| 2019-12-18 | 4 | 4 | 2 | -| 2019-12-19 | 4 | 6 | 6 | -| 2019-12-19 | 5 | 2 | 0 | -| 2019-12-20 | 5 | 2 | 0 | -| 2020-01-01 | 4 | 2 | 1 | -| 2020-01-02 | 4 | 3 | 3 | -| 2020-01-02 | 5 | 1 | 0 | -| 2020-01-03 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt index 7e7a1fea49..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt index 56ca01297f..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:-------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 | 5 | 1 | 0 | -| 2019-12-18 | 4 | 4 | 2 | -| 2019-12-19 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt index 49cdf63082..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:-------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 | 5 | 1 | 0 | -| 2019-12-19 | 5 | 2 | 0 | -| 2019-12-20 | 5 | 2 | 0 | -| 2020-01-02 | 5 | 1 | 0 | -| 2020-01-03 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt index 138d8b140e..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt index a6bfa35cf6..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000.00 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt index 313b03eda8..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt index fc66131bbc..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt index 138d8b140e..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt index 7e7a1fea49..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt index 313b03eda8..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt index fc66131bbc..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt index ac707f6407..2eb499f1ce 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| METRIC_TIME__DAY | LISTING__CAPACITY_LATEST | BOOKINGS | INSTANT_BOOKINGS | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt index 791bbc8d09..17df4cd3be 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| METRIC_TIME__DAY | TRAILING_2_MONTHS_REVENUE | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000 | +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt index 49ab821a22..9e82d183da 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| METRIC_TIME__DAY | LISTING__CAPACITY_LATEST | BOOKINGS | INSTANT_BOOKINGS | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt index 693e9c3f74..b0bbf87c09 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| METRIC_TIME__DAY | LISTING__CAPACITY_LATEST | BOOKINGS | INSTANT_BOOKINGS | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt index 138d8b140e..61ce8ab64f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-01 00:00:00 | 4 | 2 | 1 | -| 2020-01-02 00:00:00 | 4 | 3 | 3 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-01 4 2 1 +2020-01-02 4 3 3 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt index 7e7a1fea49..019a53d94a 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -| metric_time__day | trailing_2_months_revenue | -|:--------------------|----------------------------:| -| 2020-01-01 00:00:00 | 1000 | +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-01-01 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt index 313b03eda8..e16479fcf3 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-18 00:00:00 | 4 | 4 | 2 | -| 2019-12-19 00:00:00 | 4 | 6 | 6 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-18 4 4 2 +2019-12-19 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt index fc66131bbc..ea74e46753 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -| metric_time__day | listing__capacity_latest | bookings | instant_bookings | -|:--------------------|---------------------------:|-----------:|-------------------:| -| 2019-12-01 00:00:00 | 5 | 1 | 0 | -| 2019-12-19 00:00:00 | 5 | 2 | 0 | -| 2019-12-20 00:00:00 | 5 | 2 | 0 | -| 2020-01-02 00:00:00 | 5 | 1 | 0 | -| 2020-01-03 00:00:00 | 5 | 1 | 0 | +metric_time__day listing__capacity_latest bookings instant_bookings +------------------ -------------------------- ---------- ------------------ +2019-12-01 5 1 0 +2019-12-19 5 2 0 +2019-12-20 5 2 0 +2020-01-02 5 1 0 +2020-01-03 5 1 0 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index a6e99f543d..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 7000 -1 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt index 737fe3f4ca..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt index 00ddadd8bd..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt index 9875015274..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt index 57564e85eb..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 71203c48fa..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 00:00:00+00:00 7000 -1 2020-04-30 00:00:00+00:00 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt index 64f19dac82..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 00:00:00+00:00 3000 -1 2021-01-04 00:00:00+00:00 4000 -2 2021-01-05 00:00:00+00:00 4000 -3 2021-01-06 00:00:00+00:00 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt index 0217082f25..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 00:00:00+00:00 8000 7000 -1 2020-04-01 00:00:00+00:00 8000 3000 -2 2020-04-02 00:00:00+00:00 12000 7000 -3 2020-04-03 00:00:00+00:00 12000 7000 -4 2020-04-04 00:00:00+00:00 12000 7000 -5 2020-04-05 00:00:00+00:00 12000 7000 -6 2020-04-06 00:00:00+00:00 12000 7000 -7 2020-04-07 00:00:00+00:00 12000 7000 -8 2020-04-08 00:00:00+00:00 12000 7000 -9 2020-04-09 00:00:00+00:00 12000 7000 -10 2020-04-10 00:00:00+00:00 12000 7000 -11 2020-04-11 00:00:00+00:00 12000 7000 -12 2020-04-12 00:00:00+00:00 12000 7000 -13 2020-04-13 00:00:00+00:00 12000 7000 -14 2020-04-14 00:00:00+00:00 12000 7000 -15 2020-04-15 00:00:00+00:00 12000 7000 -16 2020-04-16 00:00:00+00:00 12000 7000 -17 2020-04-17 00:00:00+00:00 12000 7000 -18 2020-04-18 00:00:00+00:00 12000 7000 -19 2020-04-19 00:00:00+00:00 12000 7000 -20 2020-04-20 00:00:00+00:00 12000 7000 -21 2020-04-21 00:00:00+00:00 12000 7000 -22 2020-04-22 00:00:00+00:00 12000 7000 -23 2020-04-23 00:00:00+00:00 12000 7000 -24 2020-04-24 00:00:00+00:00 12000 7000 -25 2020-04-25 00:00:00+00:00 12000 7000 -26 2020-04-26 00:00:00+00:00 12000 7000 -27 2020-04-27 00:00:00+00:00 12000 7000 -28 2020-04-28 00:00:00+00:00 12000 7000 -29 2020-04-29 00:00:00+00:00 12000 7000 -30 2020-04-30 00:00:00+00:00 12000 7000 -31 2020-05-01 00:00:00+00:00 12000 4000 -32 2020-05-02 00:00:00+00:00 12000 4000 -33 2020-05-03 00:00:00+00:00 12000 4000 -34 2020-05-04 00:00:00+00:00 12000 4000 -35 2020-05-05 00:00:00+00:00 12000 4000 -36 2020-05-06 00:00:00+00:00 12000 4000 -37 2020-05-07 00:00:00+00:00 12000 4000 -38 2020-05-08 00:00:00+00:00 12000 4000 -39 2020-05-09 00:00:00+00:00 12000 4000 -40 2020-05-10 00:00:00+00:00 12000 4000 -41 2020-05-11 00:00:00+00:00 12000 4000 -42 2020-05-12 00:00:00+00:00 12000 4000 -43 2020-05-13 00:00:00+00:00 12000 4000 -44 2020-05-14 00:00:00+00:00 12000 4000 -45 2020-05-15 00:00:00+00:00 12000 4000 -46 2020-05-16 00:00:00+00:00 12000 4000 -47 2020-05-17 00:00:00+00:00 12000 4000 -48 2020-05-18 00:00:00+00:00 12000 4000 -49 2020-05-19 00:00:00+00:00 12000 4000 -50 2020-05-20 00:00:00+00:00 12000 4000 -51 2020-05-21 00:00:00+00:00 12000 4000 -52 2020-05-22 00:00:00+00:00 12000 4000 -53 2020-05-23 00:00:00+00:00 12000 4000 -54 2020-05-24 00:00:00+00:00 12000 4000 -55 2020-05-25 00:00:00+00:00 12000 4000 -56 2020-05-26 00:00:00+00:00 12000 4000 -57 2020-05-27 00:00:00+00:00 12000 4000 -58 2020-05-28 00:00:00+00:00 12000 4000 -59 2020-05-29 00:00:00+00:00 12000 4000 -60 2020-05-30 00:00:00+00:00 12000 4000 -61 2020-05-31 00:00:00+00:00 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt index 3fd04c9473..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 00:00:00+00:00 3 -1 2020-01-02 00:00:00+00:00 6 -2 2020-01-03 00:00:00+00:00 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt index 05d14d652a..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 00:00:00+00:00 5000 -1 2020-02-02 00:00:00+00:00 5000 -2 2020-02-03 00:00:00+00:00 5000 -3 2020-02-04 00:00:00+00:00 5000 -4 2020-02-05 00:00:00+00:00 5000 -5 2020-02-06 00:00:00+00:00 5000 -6 2020-02-07 00:00:00+00:00 5000 -7 2020-02-08 00:00:00+00:00 5000 -8 2020-02-09 00:00:00+00:00 5000 -9 2020-02-10 00:00:00+00:00 5000 -10 2020-02-11 00:00:00+00:00 5000 -11 2020-02-12 00:00:00+00:00 5000 -12 2020-02-13 00:00:00+00:00 5000 -13 2020-02-14 00:00:00+00:00 5000 -14 2020-02-15 00:00:00+00:00 5000 -15 2020-02-16 00:00:00+00:00 5000 -16 2020-02-17 00:00:00+00:00 5000 -17 2020-02-18 00:00:00+00:00 5000 -18 2020-02-19 00:00:00+00:00 5000 -19 2020-02-20 00:00:00+00:00 5000 -20 2020-02-21 00:00:00+00:00 5000 -21 2020-02-22 00:00:00+00:00 5000 -22 2020-02-23 00:00:00+00:00 5000 -23 2020-02-24 00:00:00+00:00 5000 -24 2020-02-25 00:00:00+00:00 5000 -25 2020-02-26 00:00:00+00:00 5000 -26 2020-02-27 00:00:00+00:00 5000 -27 2020-02-28 00:00:00+00:00 5000 -28 2020-02-29 00:00:00+00:00 5000 -29 2020-03-01 00:00:00+00:00 7000 -30 2020-03-02 00:00:00+00:00 7000 -31 2020-03-03 00:00:00+00:00 7000 -32 2020-03-04 00:00:00+00:00 7000 -33 2020-03-05 00:00:00+00:00 7000 -34 2020-03-06 00:00:00+00:00 7000 -35 2020-03-07 00:00:00+00:00 7000 -36 2020-03-08 00:00:00+00:00 7000 -37 2020-03-09 00:00:00+00:00 7000 -38 2020-03-10 00:00:00+00:00 7000 -39 2020-03-11 00:00:00+00:00 7000 -40 2020-03-12 00:00:00+00:00 7000 -41 2020-03-13 00:00:00+00:00 7000 -42 2020-03-14 00:00:00+00:00 7000 -43 2020-03-15 00:00:00+00:00 7000 -44 2020-03-16 00:00:00+00:00 7000 -45 2020-03-17 00:00:00+00:00 7000 -46 2020-03-18 00:00:00+00:00 7000 -47 2020-03-19 00:00:00+00:00 7000 -48 2020-03-20 00:00:00+00:00 7000 -49 2020-03-21 00:00:00+00:00 7000 -50 2020-03-22 00:00:00+00:00 7000 -51 2020-03-23 00:00:00+00:00 7000 -52 2020-03-24 00:00:00+00:00 7000 -53 2020-03-25 00:00:00+00:00 7000 -54 2020-03-26 00:00:00+00:00 7000 -55 2020-03-27 00:00:00+00:00 7000 -56 2020-03-28 00:00:00+00:00 7000 -57 2020-03-29 00:00:00+00:00 7000 -58 2020-03-30 00:00:00+00:00 7000 -59 2020-03-31 00:00:00+00:00 7000 -60 2020-04-01 00:00:00+00:00 3000 -61 2020-04-02 00:00:00+00:00 7000 -62 2020-04-03 00:00:00+00:00 7000 -63 2020-04-04 00:00:00+00:00 7000 -64 2020-04-05 00:00:00+00:00 7000 -65 2020-04-06 00:00:00+00:00 7000 -66 2020-04-07 00:00:00+00:00 7000 -67 2020-04-08 00:00:00+00:00 7000 -68 2020-04-09 00:00:00+00:00 7000 -69 2020-04-10 00:00:00+00:00 7000 -70 2020-04-11 00:00:00+00:00 7000 -71 2020-04-12 00:00:00+00:00 7000 -72 2020-04-13 00:00:00+00:00 7000 -73 2020-04-14 00:00:00+00:00 7000 -74 2020-04-15 00:00:00+00:00 7000 -75 2020-04-16 00:00:00+00:00 7000 -76 2020-04-17 00:00:00+00:00 7000 -77 2020-04-18 00:00:00+00:00 7000 -78 2020-04-19 00:00:00+00:00 7000 -79 2020-04-20 00:00:00+00:00 7000 -80 2020-04-21 00:00:00+00:00 7000 -81 2020-04-22 00:00:00+00:00 7000 -82 2020-04-23 00:00:00+00:00 7000 -83 2020-04-24 00:00:00+00:00 7000 -84 2020-04-25 00:00:00+00:00 7000 -85 2020-04-26 00:00:00+00:00 7000 -86 2020-04-27 00:00:00+00:00 7000 -87 2020-04-28 00:00:00+00:00 7000 -88 2020-04-29 00:00:00+00:00 7000 -89 2020-04-30 00:00:00+00:00 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index a6e99f543d..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 7000 -1 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt index 737fe3f4ca..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt index 00ddadd8bd..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt index 9875015274..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt index 57564e85eb..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 041c8442ed..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 7000 -1 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt index b5214d2035..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt index 43f215f1ee..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt index 9875015274..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt index 84fbc88f10..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index a6e99f543d..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 7000 -1 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt index 737fe3f4ca..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt index 00ddadd8bd..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt index 9875015274..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt index 57564e85eb..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 4485fb4b21..28a873d53c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE -0 2020-03-15 7000 -1 2020-04-30 7000 +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt index 072298cd93..3deebfe4e4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - METRIC_TIME__DAY REVENUE_MTD -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +METRIC_TIME__DAY REVENUE_MTD +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt index c9bf660041..ac2a83e912 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - METRIC_TIME__DAY REVENUE_ALL_TIME TRAILING_2_MONTHS_REVENUE -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +METRIC_TIME__DAY REVENUE_ALL_TIME TRAILING_2_MONTHS_REVENUE +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt index a4bac3b94a..65bedb24fc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - METRIC_TIME__DAY EVERY_TWO_DAYS_BOOKERS -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +METRIC_TIME__DAY EVERY_TWO_DAYS_BOOKERS +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt index b0e46bbdd1..0ff1b72c63 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index a6e99f543d..307efd49dd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,4 @@ - metric_time__day trailing_2_months_revenue -0 2020-03-15 7000 -1 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-03-15 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt index 737fe3f4ca..a51dd95668 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,5 +1,6 @@ - metric_time__day revenue_mtd -0 2021-01-03 3000 -1 2021-01-04 4000 -2 2021-01-05 4000 -3 2021-01-06 4000 +metric_time__day revenue_mtd +------------------ ------------- +2021-01-03 3000 +2021-01-04 4000 +2021-01-05 4000 +2021-01-06 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt index 00ddadd8bd..0bf8a20dd9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day revenue_all_time trailing_2_months_revenue -0 2020-03-31 8000 7000 -1 2020-04-01 8000 3000 -2 2020-04-02 12000 7000 -3 2020-04-03 12000 7000 -4 2020-04-04 12000 7000 -5 2020-04-05 12000 7000 -6 2020-04-06 12000 7000 -7 2020-04-07 12000 7000 -8 2020-04-08 12000 7000 -9 2020-04-09 12000 7000 -10 2020-04-10 12000 7000 -11 2020-04-11 12000 7000 -12 2020-04-12 12000 7000 -13 2020-04-13 12000 7000 -14 2020-04-14 12000 7000 -15 2020-04-15 12000 7000 -16 2020-04-16 12000 7000 -17 2020-04-17 12000 7000 -18 2020-04-18 12000 7000 -19 2020-04-19 12000 7000 -20 2020-04-20 12000 7000 -21 2020-04-21 12000 7000 -22 2020-04-22 12000 7000 -23 2020-04-23 12000 7000 -24 2020-04-24 12000 7000 -25 2020-04-25 12000 7000 -26 2020-04-26 12000 7000 -27 2020-04-27 12000 7000 -28 2020-04-28 12000 7000 -29 2020-04-29 12000 7000 -30 2020-04-30 12000 7000 -31 2020-05-01 12000 4000 -32 2020-05-02 12000 4000 -33 2020-05-03 12000 4000 -34 2020-05-04 12000 4000 -35 2020-05-05 12000 4000 -36 2020-05-06 12000 4000 -37 2020-05-07 12000 4000 -38 2020-05-08 12000 4000 -39 2020-05-09 12000 4000 -40 2020-05-10 12000 4000 -41 2020-05-11 12000 4000 -42 2020-05-12 12000 4000 -43 2020-05-13 12000 4000 -44 2020-05-14 12000 4000 -45 2020-05-15 12000 4000 -46 2020-05-16 12000 4000 -47 2020-05-17 12000 4000 -48 2020-05-18 12000 4000 -49 2020-05-19 12000 4000 -50 2020-05-20 12000 4000 -51 2020-05-21 12000 4000 -52 2020-05-22 12000 4000 -53 2020-05-23 12000 4000 -54 2020-05-24 12000 4000 -55 2020-05-25 12000 4000 -56 2020-05-26 12000 4000 -57 2020-05-27 12000 4000 -58 2020-05-28 12000 4000 -59 2020-05-29 12000 4000 -60 2020-05-30 12000 4000 -61 2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------ ------------------ --------------------------- +2020-03-31 8000 7000 +2020-04-01 8000 3000 +2020-04-02 12000 7000 +2020-04-03 12000 7000 +2020-04-04 12000 7000 +2020-04-05 12000 7000 +2020-04-06 12000 7000 +2020-04-07 12000 7000 +2020-04-08 12000 7000 +2020-04-09 12000 7000 +2020-04-10 12000 7000 +2020-04-11 12000 7000 +2020-04-12 12000 7000 +2020-04-13 12000 7000 +2020-04-14 12000 7000 +2020-04-15 12000 7000 +2020-04-16 12000 7000 +2020-04-17 12000 7000 +2020-04-18 12000 7000 +2020-04-19 12000 7000 +2020-04-20 12000 7000 +2020-04-21 12000 7000 +2020-04-22 12000 7000 +2020-04-23 12000 7000 +2020-04-24 12000 7000 +2020-04-25 12000 7000 +2020-04-26 12000 7000 +2020-04-27 12000 7000 +2020-04-28 12000 7000 +2020-04-29 12000 7000 +2020-04-30 12000 7000 +2020-05-01 12000 4000 +2020-05-02 12000 4000 +2020-05-03 12000 4000 +2020-05-04 12000 4000 +2020-05-05 12000 4000 +2020-05-06 12000 4000 +2020-05-07 12000 4000 +2020-05-08 12000 4000 +2020-05-09 12000 4000 +2020-05-10 12000 4000 +2020-05-11 12000 4000 +2020-05-12 12000 4000 +2020-05-13 12000 4000 +2020-05-14 12000 4000 +2020-05-15 12000 4000 +2020-05-16 12000 4000 +2020-05-17 12000 4000 +2020-05-18 12000 4000 +2020-05-19 12000 4000 +2020-05-20 12000 4000 +2020-05-21 12000 4000 +2020-05-22 12000 4000 +2020-05-23 12000 4000 +2020-05-24 12000 4000 +2020-05-25 12000 4000 +2020-05-26 12000 4000 +2020-05-27 12000 4000 +2020-05-28 12000 4000 +2020-05-29 12000 4000 +2020-05-30 12000 4000 +2020-05-31 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt index 9875015274..ab06f83868 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt @@ -1,4 +1,5 @@ - metric_time__day every_two_days_bookers -0 2020-01-01 3 -1 2020-01-02 6 -2 2020-01-03 4 +metric_time__day every_two_days_bookers +------------------ ------------------------ +2020-01-01 3 +2020-01-02 6 +2020-01-03 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt index 57564e85eb..9642fee650 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt @@ -1,91 +1,92 @@ - metric_time__day trailing_2_months_revenue -0 2020-02-01 5000 -1 2020-02-02 5000 -2 2020-02-03 5000 -3 2020-02-04 5000 -4 2020-02-05 5000 -5 2020-02-06 5000 -6 2020-02-07 5000 -7 2020-02-08 5000 -8 2020-02-09 5000 -9 2020-02-10 5000 -10 2020-02-11 5000 -11 2020-02-12 5000 -12 2020-02-13 5000 -13 2020-02-14 5000 -14 2020-02-15 5000 -15 2020-02-16 5000 -16 2020-02-17 5000 -17 2020-02-18 5000 -18 2020-02-19 5000 -19 2020-02-20 5000 -20 2020-02-21 5000 -21 2020-02-22 5000 -22 2020-02-23 5000 -23 2020-02-24 5000 -24 2020-02-25 5000 -25 2020-02-26 5000 -26 2020-02-27 5000 -27 2020-02-28 5000 -28 2020-02-29 5000 -29 2020-03-01 7000 -30 2020-03-02 7000 -31 2020-03-03 7000 -32 2020-03-04 7000 -33 2020-03-05 7000 -34 2020-03-06 7000 -35 2020-03-07 7000 -36 2020-03-08 7000 -37 2020-03-09 7000 -38 2020-03-10 7000 -39 2020-03-11 7000 -40 2020-03-12 7000 -41 2020-03-13 7000 -42 2020-03-14 7000 -43 2020-03-15 7000 -44 2020-03-16 7000 -45 2020-03-17 7000 -46 2020-03-18 7000 -47 2020-03-19 7000 -48 2020-03-20 7000 -49 2020-03-21 7000 -50 2020-03-22 7000 -51 2020-03-23 7000 -52 2020-03-24 7000 -53 2020-03-25 7000 -54 2020-03-26 7000 -55 2020-03-27 7000 -56 2020-03-28 7000 -57 2020-03-29 7000 -58 2020-03-30 7000 -59 2020-03-31 7000 -60 2020-04-01 3000 -61 2020-04-02 7000 -62 2020-04-03 7000 -63 2020-04-04 7000 -64 2020-04-05 7000 -65 2020-04-06 7000 -66 2020-04-07 7000 -67 2020-04-08 7000 -68 2020-04-09 7000 -69 2020-04-10 7000 -70 2020-04-11 7000 -71 2020-04-12 7000 -72 2020-04-13 7000 -73 2020-04-14 7000 -74 2020-04-15 7000 -75 2020-04-16 7000 -76 2020-04-17 7000 -77 2020-04-18 7000 -78 2020-04-19 7000 -79 2020-04-20 7000 -80 2020-04-21 7000 -81 2020-04-22 7000 -82 2020-04-23 7000 -83 2020-04-24 7000 -84 2020-04-25 7000 -85 2020-04-26 7000 -86 2020-04-27 7000 -87 2020-04-28 7000 -88 2020-04-29 7000 -89 2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------ --------------------------- +2020-02-01 5000 +2020-02-02 5000 +2020-02-03 5000 +2020-02-04 5000 +2020-02-05 5000 +2020-02-06 5000 +2020-02-07 5000 +2020-02-08 5000 +2020-02-09 5000 +2020-02-10 5000 +2020-02-11 5000 +2020-02-12 5000 +2020-02-13 5000 +2020-02-14 5000 +2020-02-15 5000 +2020-02-16 5000 +2020-02-17 5000 +2020-02-18 5000 +2020-02-19 5000 +2020-02-20 5000 +2020-02-21 5000 +2020-02-22 5000 +2020-02-23 5000 +2020-02-24 5000 +2020-02-25 5000 +2020-02-26 5000 +2020-02-27 5000 +2020-02-28 5000 +2020-02-29 5000 +2020-03-01 7000 +2020-03-02 7000 +2020-03-03 7000 +2020-03-04 7000 +2020-03-05 7000 +2020-03-06 7000 +2020-03-07 7000 +2020-03-08 7000 +2020-03-09 7000 +2020-03-10 7000 +2020-03-11 7000 +2020-03-12 7000 +2020-03-13 7000 +2020-03-14 7000 +2020-03-15 7000 +2020-03-16 7000 +2020-03-17 7000 +2020-03-18 7000 +2020-03-19 7000 +2020-03-20 7000 +2020-03-21 7000 +2020-03-22 7000 +2020-03-23 7000 +2020-03-24 7000 +2020-03-25 7000 +2020-03-26 7000 +2020-03-27 7000 +2020-03-28 7000 +2020-03-29 7000 +2020-03-30 7000 +2020-03-31 7000 +2020-04-01 3000 +2020-04-02 7000 +2020-04-03 7000 +2020-04-04 7000 +2020-04-05 7000 +2020-04-06 7000 +2020-04-07 7000 +2020-04-08 7000 +2020-04-09 7000 +2020-04-10 7000 +2020-04-11 7000 +2020-04-12 7000 +2020-04-13 7000 +2020-04-14 7000 +2020-04-15 7000 +2020-04-16 7000 +2020-04-17 7000 +2020-04-18 7000 +2020-04-19 7000 +2020-04-20 7000 +2020-04-21 7000 +2020-04-22 7000 +2020-04-23 7000 +2020-04-24 7000 +2020-04-25 7000 +2020-04-26 7000 +2020-04-27 7000 +2020-04-28 7000 +2020-04-29 7000 +2020-04-30 7000 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 15d152a963..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 985b33cc21..dfdbd0b22d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 None 6 NaN -4 2019-12-19 False 6 NaN -5 2019-12-19 True 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 None 3 1.0 -10 2020-01-02 False 3 3.0 -11 2020-01-02 True 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 None 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 None 3 1 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 7a4726bf18..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt index 7ddd9fa0ea..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt index 2a91746dc1..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 855967c2d5..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 00:00:00+00:00 0 NaN -1 2019-11-28 00:00:00+00:00 0 NaN -2 2019-11-29 00:00:00+00:00 0 NaN -3 2019-11-30 00:00:00+00:00 0 NaN -4 2019-12-01 00:00:00+00:00 1 NaN -5 2019-12-02 00:00:00+00:00 0 NaN -6 2019-12-03 00:00:00+00:00 0 NaN -7 2019-12-04 00:00:00+00:00 0 NaN -8 2019-12-05 00:00:00+00:00 0 NaN -9 2019-12-06 00:00:00+00:00 0 NaN -10 2019-12-07 00:00:00+00:00 0 NaN -11 2019-12-08 00:00:00+00:00 0 NaN -12 2019-12-09 00:00:00+00:00 0 NaN -13 2019-12-10 00:00:00+00:00 0 NaN -14 2019-12-11 00:00:00+00:00 0 NaN -15 2019-12-12 00:00:00+00:00 0 NaN -16 2019-12-13 00:00:00+00:00 0 NaN -17 2019-12-14 00:00:00+00:00 0 NaN -18 2019-12-15 00:00:00+00:00 0 NaN -19 2019-12-16 00:00:00+00:00 0 NaN -20 2019-12-17 00:00:00+00:00 0 NaN -21 2019-12-18 00:00:00+00:00 10 NaN -22 2019-12-19 00:00:00+00:00 18 NaN -23 2019-12-20 00:00:00+00:00 2 NaN -24 2019-12-21 00:00:00+00:00 0 NaN -25 2019-12-22 00:00:00+00:00 0 NaN -26 2019-12-23 00:00:00+00:00 0 NaN -27 2019-12-24 00:00:00+00:00 0 NaN -28 2019-12-25 00:00:00+00:00 0 NaN -29 2019-12-26 00:00:00+00:00 0 NaN -30 2019-12-27 00:00:00+00:00 0 NaN -31 2019-12-28 00:00:00+00:00 0 NaN -32 2019-12-29 00:00:00+00:00 0 NaN -33 2019-12-30 00:00:00+00:00 0 NaN -34 2019-12-31 00:00:00+00:00 0 NaN -35 2020-01-01 00:00:00+00:00 5 2.0 -36 2020-01-02 00:00:00+00:00 9 5.0 -37 2020-01-03 00:00:00+00:00 1 NaN -38 2020-01-04 00:00:00+00:00 0 1.0 -39 2020-01-05 00:00:00+00:00 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index f352a88aca..dfdbd0b22d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 00:00:00+00:00 True 1 NaN -1 2019-12-18 00:00:00+00:00 False 4 NaN -2 2019-12-18 00:00:00+00:00 True 6 NaN -3 2019-12-19 00:00:00+00:00 None 6 NaN -4 2019-12-19 00:00:00+00:00 False 6 NaN -5 2019-12-19 00:00:00+00:00 True 6 NaN -6 2019-12-20 00:00:00+00:00 True 2 NaN -7 2020-01-01 00:00:00+00:00 False 2 NaN -8 2020-01-01 00:00:00+00:00 True 3 2.0 -9 2020-01-02 00:00:00+00:00 None 3 1.0 -10 2020-01-02 00:00:00+00:00 False 3 3.0 -11 2020-01-02 00:00:00+00:00 True 3 1.0 -12 2020-01-03 00:00:00+00:00 True 1 NaN -13 2020-01-04 00:00:00+00:00 False 0 1.0 -14 2020-01-05 00:00:00+00:00 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 None 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 None 3 1 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 9cb9d895c7..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 00:00:00+00:00 0 -1 2019-11-28 00:00:00+00:00 0 -2 2019-11-29 00:00:00+00:00 0 -3 2019-11-30 00:00:00+00:00 0 -4 2019-12-01 00:00:00+00:00 1 -5 2019-12-02 00:00:00+00:00 0 -6 2019-12-03 00:00:00+00:00 0 -7 2019-12-04 00:00:00+00:00 0 -8 2019-12-05 00:00:00+00:00 0 -9 2019-12-06 00:00:00+00:00 0 -10 2019-12-07 00:00:00+00:00 0 -11 2019-12-08 00:00:00+00:00 0 -12 2019-12-09 00:00:00+00:00 0 -13 2019-12-10 00:00:00+00:00 0 -14 2019-12-11 00:00:00+00:00 0 -15 2019-12-12 00:00:00+00:00 0 -16 2019-12-13 00:00:00+00:00 0 -17 2019-12-14 00:00:00+00:00 0 -18 2019-12-15 00:00:00+00:00 0 -19 2019-12-16 00:00:00+00:00 0 -20 2019-12-17 00:00:00+00:00 0 -21 2019-12-18 00:00:00+00:00 10 -22 2019-12-19 00:00:00+00:00 18 -23 2019-12-20 00:00:00+00:00 2 -24 2019-12-21 00:00:00+00:00 0 -25 2019-12-22 00:00:00+00:00 0 -26 2019-12-23 00:00:00+00:00 0 -27 2019-12-24 00:00:00+00:00 0 -28 2019-12-25 00:00:00+00:00 0 -29 2019-12-26 00:00:00+00:00 0 -30 2019-12-27 00:00:00+00:00 0 -31 2019-12-28 00:00:00+00:00 0 -32 2019-12-29 00:00:00+00:00 0 -33 2019-12-30 00:00:00+00:00 0 -34 2019-12-31 00:00:00+00:00 0 -35 2020-01-01 00:00:00+00:00 5 -36 2020-01-02 00:00:00+00:00 9 -37 2020-01-03 00:00:00+00:00 1 -38 2020-01-04 00:00:00+00:00 0 -39 2020-01-05 00:00:00+00:00 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt index 78af74b1f8..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 00:00:00+00:00 0 -1 2019-02-01 00:00:00+00:00 0 -2 2019-03-01 00:00:00+00:00 0 -3 2019-04-01 00:00:00+00:00 0 -4 2019-05-01 00:00:00+00:00 0 -5 2019-06-01 00:00:00+00:00 0 -6 2019-07-01 00:00:00+00:00 0 -7 2019-08-01 00:00:00+00:00 0 -8 2019-09-01 00:00:00+00:00 0 -9 2019-10-01 00:00:00+00:00 0 -10 2019-11-01 00:00:00+00:00 0 -11 2019-12-01 00:00:00+00:00 31 -12 2020-01-01 00:00:00+00:00 15 -13 2020-02-01 00:00:00+00:00 0 -14 2020-03-01 00:00:00+00:00 0 -15 2020-04-01 00:00:00+00:00 0 -16 2020-05-01 00:00:00+00:00 0 -17 2020-06-01 00:00:00+00:00 0 -18 2020-07-01 00:00:00+00:00 0 -19 2020-08-01 00:00:00+00:00 0 -20 2020-09-01 00:00:00+00:00 0 -21 2020-10-01 00:00:00+00:00 0 -22 2020-11-01 00:00:00+00:00 0 -23 2020-12-01 00:00:00+00:00 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt index 3c824fc9af..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 00:00:00+00:00 NaN -1 2019-11-28 00:00:00+00:00 NaN -2 2019-11-29 00:00:00+00:00 NaN -3 2019-11-30 00:00:00+00:00 NaN -4 2019-12-01 00:00:00+00:00 1.0 -5 2019-12-02 00:00:00+00:00 NaN -6 2019-12-03 00:00:00+00:00 NaN -7 2019-12-04 00:00:00+00:00 NaN -8 2019-12-05 00:00:00+00:00 NaN -9 2019-12-06 00:00:00+00:00 NaN -10 2019-12-07 00:00:00+00:00 NaN -11 2019-12-08 00:00:00+00:00 NaN -12 2019-12-09 00:00:00+00:00 NaN -13 2019-12-10 00:00:00+00:00 NaN -14 2019-12-11 00:00:00+00:00 NaN -15 2019-12-12 00:00:00+00:00 NaN -16 2019-12-13 00:00:00+00:00 NaN -17 2019-12-14 00:00:00+00:00 NaN -18 2019-12-15 00:00:00+00:00 NaN -19 2019-12-16 00:00:00+00:00 NaN -20 2019-12-17 00:00:00+00:00 NaN -21 2019-12-18 00:00:00+00:00 10.0 -22 2019-12-19 00:00:00+00:00 18.0 -23 2019-12-20 00:00:00+00:00 2.0 -24 2019-12-21 00:00:00+00:00 NaN -25 2019-12-22 00:00:00+00:00 NaN -26 2019-12-23 00:00:00+00:00 NaN -27 2019-12-24 00:00:00+00:00 NaN -28 2019-12-25 00:00:00+00:00 NaN -29 2019-12-26 00:00:00+00:00 NaN -30 2019-12-27 00:00:00+00:00 NaN -31 2019-12-28 00:00:00+00:00 NaN -32 2019-12-29 00:00:00+00:00 NaN -33 2019-12-30 00:00:00+00:00 NaN -34 2019-12-31 00:00:00+00:00 NaN -35 2020-01-01 00:00:00+00:00 5.0 -36 2020-01-02 00:00:00+00:00 9.0 -37 2020-01-03 00:00:00+00:00 1.0 -38 2020-01-04 00:00:00+00:00 NaN -39 2020-01-05 00:00:00+00:00 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 15d152a963..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index f5bb2ed4ba..0350ccd172 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 False 6 NaN -4 2019-12-19 True 6 NaN -5 2019-12-19 None 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 False 3 3.0 -10 2020-01-02 True 3 1.0 -11 2020-01-02 None 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-19 None 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-02 None 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 7a4726bf18..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt index 7ddd9fa0ea..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt index 2a91746dc1..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 15d152a963..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index f5bb2ed4ba..0350ccd172 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 False 6 NaN -4 2019-12-19 True 6 NaN -5 2019-12-19 None 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 False 3 3.0 -10 2020-01-02 True 3 1.0 -11 2020-01-02 None 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-19 None 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-02 None 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 7a4726bf18..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt index 7ddd9fa0ea..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt index 2a91746dc1..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 15d152a963..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index f5bb2ed4ba..0350ccd172 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 False 6 NaN -4 2019-12-19 True 6 NaN -5 2019-12-19 None 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 False 3 3.0 -10 2020-01-02 True 3 1.0 -11 2020-01-02 None 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-19 None 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-02 None 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 7a4726bf18..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt index 7ddd9fa0ea..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt index 2a91746dc1..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 5c533bbad5..5a2b2892a8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 VIEWS -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 VIEWS +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 16b71cd5ef..5f35d9f5c4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - METRIC_TIME__DAY LISTING__IS_LUX_LATEST BOOKINGS_FILL_NULLS_WITH_0_WITHOUT_TIME_SPINE VIEWS -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 False 6 NaN -4 2019-12-19 True 6 NaN -5 2019-12-19 None 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 False 3 3.0 -10 2020-01-02 True 3 1.0 -11 2020-01-02 None 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +METRIC_TIME__DAY LISTING__IS_LUX_LATEST BOOKINGS_FILL_NULLS_WITH_0_WITHOUT_TIME_SPINE VIEWS +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-19 None 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-02 None 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 64b2c5573e..ca823bce3f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt index da157cd286..74a4be149d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - METRIC_TIME__MONTH BOOKINGS_FILL_NULLS_WITH_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +METRIC_TIME__MONTH BOOKINGS_FILL_NULLS_WITH_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt index fa7297366c..a0dcc995c9 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 15d152a963..ce9627c6e4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 views -0 2019-11-27 0 NaN -1 2019-11-28 0 NaN -2 2019-11-29 0 NaN -3 2019-11-30 0 NaN -4 2019-12-01 1 NaN -5 2019-12-02 0 NaN -6 2019-12-03 0 NaN -7 2019-12-04 0 NaN -8 2019-12-05 0 NaN -9 2019-12-06 0 NaN -10 2019-12-07 0 NaN -11 2019-12-08 0 NaN -12 2019-12-09 0 NaN -13 2019-12-10 0 NaN -14 2019-12-11 0 NaN -15 2019-12-12 0 NaN -16 2019-12-13 0 NaN -17 2019-12-14 0 NaN -18 2019-12-15 0 NaN -19 2019-12-16 0 NaN -20 2019-12-17 0 NaN -21 2019-12-18 10 NaN -22 2019-12-19 18 NaN -23 2019-12-20 2 NaN -24 2019-12-21 0 NaN -25 2019-12-22 0 NaN -26 2019-12-23 0 NaN -27 2019-12-24 0 NaN -28 2019-12-25 0 NaN -29 2019-12-26 0 NaN -30 2019-12-27 0 NaN -31 2019-12-28 0 NaN -32 2019-12-29 0 NaN -33 2019-12-30 0 NaN -34 2019-12-31 0 NaN -35 2020-01-01 5 2.0 -36 2020-01-02 9 5.0 -37 2020-01-03 1 NaN -38 2020-01-04 0 1.0 -39 2020-01-05 0 1.0 +metric_time__day bookings_fill_nulls_with_0 views +------------------ ---------------------------- ------- +2019-11-27 0 None +2019-11-28 0 None +2019-11-29 0 None +2019-11-30 0 None +2019-12-01 1 None +2019-12-02 0 None +2019-12-03 0 None +2019-12-04 0 None +2019-12-05 0 None +2019-12-06 0 None +2019-12-07 0 None +2019-12-08 0 None +2019-12-09 0 None +2019-12-10 0 None +2019-12-11 0 None +2019-12-12 0 None +2019-12-13 0 None +2019-12-14 0 None +2019-12-15 0 None +2019-12-16 0 None +2019-12-17 0 None +2019-12-18 10 None +2019-12-19 18 None +2019-12-20 2 None +2019-12-21 0 None +2019-12-22 0 None +2019-12-23 0 None +2019-12-24 0 None +2019-12-25 0 None +2019-12-26 0 None +2019-12-27 0 None +2019-12-28 0 None +2019-12-29 0 None +2019-12-30 0 None +2019-12-31 0 None +2020-01-01 5 2 +2020-01-02 9 5 +2020-01-03 1 None +2020-01-04 0 1 +2020-01-05 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index f5bb2ed4ba..0350ccd172 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,16 +1,17 @@ - metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views -0 2019-12-01 True 1 NaN -1 2019-12-18 False 4 NaN -2 2019-12-18 True 6 NaN -3 2019-12-19 False 6 NaN -4 2019-12-19 True 6 NaN -5 2019-12-19 None 6 NaN -6 2019-12-20 True 2 NaN -7 2020-01-01 False 2 NaN -8 2020-01-01 True 3 2.0 -9 2020-01-02 False 3 3.0 -10 2020-01-02 True 3 1.0 -11 2020-01-02 None 3 1.0 -12 2020-01-03 True 1 NaN -13 2020-01-04 False 0 1.0 -14 2020-01-05 None 0 1.0 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------ ------------------------ ----------------------------------------------- ------- +2019-12-01 True 1 None +2019-12-18 False 4 None +2019-12-18 True 6 None +2019-12-19 False 6 None +2019-12-19 True 6 None +2019-12-19 None 6 None +2019-12-20 True 2 None +2020-01-01 False 2 None +2020-01-01 True 3 2 +2020-01-02 False 3 3 +2020-01-02 True 3 1 +2020-01-02 None 3 1 +2020-01-03 True 1 None +2020-01-04 False 0 1 +2020-01-05 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 7a4726bf18..ba26c8390b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_fill_nulls_with_0 -0 2019-11-27 0 -1 2019-11-28 0 -2 2019-11-29 0 -3 2019-11-30 0 -4 2019-12-01 1 -5 2019-12-02 0 -6 2019-12-03 0 -7 2019-12-04 0 -8 2019-12-05 0 -9 2019-12-06 0 -10 2019-12-07 0 -11 2019-12-08 0 -12 2019-12-09 0 -13 2019-12-10 0 -14 2019-12-11 0 -15 2019-12-12 0 -16 2019-12-13 0 -17 2019-12-14 0 -18 2019-12-15 0 -19 2019-12-16 0 -20 2019-12-17 0 -21 2019-12-18 10 -22 2019-12-19 18 -23 2019-12-20 2 -24 2019-12-21 0 -25 2019-12-22 0 -26 2019-12-23 0 -27 2019-12-24 0 -28 2019-12-25 0 -29 2019-12-26 0 -30 2019-12-27 0 -31 2019-12-28 0 -32 2019-12-29 0 -33 2019-12-30 0 -34 2019-12-31 0 -35 2020-01-01 5 -36 2020-01-02 9 -37 2020-01-03 1 -38 2020-01-04 0 -39 2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------ ---------------------------- +2019-11-27 0 +2019-11-28 0 +2019-11-29 0 +2019-11-30 0 +2019-12-01 1 +2019-12-02 0 +2019-12-03 0 +2019-12-04 0 +2019-12-05 0 +2019-12-06 0 +2019-12-07 0 +2019-12-08 0 +2019-12-09 0 +2019-12-10 0 +2019-12-11 0 +2019-12-12 0 +2019-12-13 0 +2019-12-14 0 +2019-12-15 0 +2019-12-16 0 +2019-12-17 0 +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 0 +2019-12-22 0 +2019-12-23 0 +2019-12-24 0 +2019-12-25 0 +2019-12-26 0 +2019-12-27 0 +2019-12-28 0 +2019-12-29 0 +2019-12-30 0 +2019-12-31 0 +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 0 +2020-01-05 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt index 7ddd9fa0ea..404f3e9d73 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,25 +1,26 @@ - metric_time__month bookings_fill_nulls_with_0 -0 2019-01-01 0 -1 2019-02-01 0 -2 2019-03-01 0 -3 2019-04-01 0 -4 2019-05-01 0 -5 2019-06-01 0 -6 2019-07-01 0 -7 2019-08-01 0 -8 2019-09-01 0 -9 2019-10-01 0 -10 2019-11-01 0 -11 2019-12-01 31 -12 2020-01-01 15 -13 2020-02-01 0 -14 2020-03-01 0 -15 2020-04-01 0 -16 2020-05-01 0 -17 2020-06-01 0 -18 2020-07-01 0 -19 2020-08-01 0 -20 2020-09-01 0 -21 2020-10-01 0 -22 2020-11-01 0 -23 2020-12-01 0 +metric_time__month bookings_fill_nulls_with_0 +-------------------- ---------------------------- +2019-01-01 0 +2019-02-01 0 +2019-03-01 0 +2019-04-01 0 +2019-05-01 0 +2019-06-01 0 +2019-07-01 0 +2019-08-01 0 +2019-09-01 0 +2019-10-01 0 +2019-11-01 0 +2019-12-01 31 +2020-01-01 15 +2020-02-01 0 +2020-03-01 0 +2020-04-01 0 +2020-05-01 0 +2020-06-01 0 +2020-07-01 0 +2020-08-01 0 +2020-09-01 0 +2020-10-01 0 +2020-11-01 0 +2020-12-01 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt index 2a91746dc1..22205225f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt @@ -1,41 +1,42 @@ - metric_time__day bookings_join_to_time_spine -0 2019-11-27 NaN -1 2019-11-28 NaN -2 2019-11-29 NaN -3 2019-11-30 NaN -4 2019-12-01 1.0 -5 2019-12-02 NaN -6 2019-12-03 NaN -7 2019-12-04 NaN -8 2019-12-05 NaN -9 2019-12-06 NaN -10 2019-12-07 NaN -11 2019-12-08 NaN -12 2019-12-09 NaN -13 2019-12-10 NaN -14 2019-12-11 NaN -15 2019-12-12 NaN -16 2019-12-13 NaN -17 2019-12-14 NaN -18 2019-12-15 NaN -19 2019-12-16 NaN -20 2019-12-17 NaN -21 2019-12-18 10.0 -22 2019-12-19 18.0 -23 2019-12-20 2.0 -24 2019-12-21 NaN -25 2019-12-22 NaN -26 2019-12-23 NaN -27 2019-12-24 NaN -28 2019-12-25 NaN -29 2019-12-26 NaN -30 2019-12-27 NaN -31 2019-12-28 NaN -32 2019-12-29 NaN -33 2019-12-30 NaN -34 2019-12-31 NaN -35 2020-01-01 5.0 -36 2020-01-02 9.0 -37 2020-01-03 1.0 -38 2020-01-04 NaN -39 2020-01-05 NaN +metric_time__day bookings_join_to_time_spine +------------------ ----------------------------- +2019-11-27 None +2019-11-28 None +2019-11-29 None +2019-11-30 None +2019-12-01 1 +2019-12-02 None +2019-12-03 None +2019-12-04 None +2019-12-05 None +2019-12-06 None +2019-12-07 None +2019-12-08 None +2019-12-09 None +2019-12-10 None +2019-12-11 None +2019-12-12 None +2019-12-13 None +2019-12-14 None +2019-12-15 None +2019-12-16 None +2019-12-17 None +2019-12-18 10 +2019-12-19 18 +2019-12-20 2 +2019-12-21 None +2019-12-22 None +2019-12-23 None +2019-12-24 None +2019-12-25 None +2019-12-26 None +2019-12-27 None +2019-12-28 None +2019-12-29 None +2019-12-30 None +2019-12-31 None +2020-01-01 5 +2020-01-02 9 +2020-01-03 1 +2020-01-04 None +2020-01-05 None diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt index 662f9af1cc..20a017f46b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - LISTING ACTIVE_LISTINGS BOOKINGS -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +LISTING ACTIVE_LISTINGS BOOKINGS +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt index 71e4b0856e..f37096d8e8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - LISTING LISTINGS BOOKINGS -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +LISTING LISTINGS BOOKINGS +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt index d08c0b7223..3d93de3d16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,7 +1,8 @@ - listing active_listings bookings -0 l2718281 1.0 15 -1 l3141592 1.0 15 -2 l5948301 1.0 7 -3 l8912456-incomplete 1.0 3 -4 l9658588-incomplete 1.0 3 -5 no_such_listing NaN 3 +listing active_listings bookings +------------------- ----------------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 +l8912456-incomplete 1 3 +l9658588-incomplete 1 3 +no_such_listing None 3 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt index 52dda1f27b..f98e407d50 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,4 +1,5 @@ - listing listings bookings -0 l2718281 1 15 -1 l3141592 1 15 -2 l5948301 1 7 +listing listings bookings +--------- ---------- ---------- +l2718281 1 15 +l3141592 1 15 +l5948301 1 7 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt index 8875d9a563..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt index d339e19f8a..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2fc79193f7..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -1 2019-12-02 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -2 2019-12-03 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -3 2019-12-04 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -4 2019-12-05 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -5 2019-12-06 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -6 2019-12-07 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -7 2019-12-08 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -8 2019-12-09 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -9 2019-12-10 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -10 2019-12-11 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -11 2019-12-12 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -12 2019-12-13 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -13 2019-12-14 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -14 2019-12-15 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -15 2019-12-16 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -16 2019-12-17 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -17 2019-12-18 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -18 2019-12-19 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -19 2019-12-20 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -20 2019-12-21 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -21 2019-12-22 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -22 2019-12-23 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -23 2019-12-24 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -24 2019-12-25 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -25 2019-12-26 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -26 2019-12-27 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -27 2019-12-28 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -28 2019-12-29 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -29 2019-12-30 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -30 2019-12-31 00:00:00+00:00 2019-12-01 00:00:00+00:00 2019-01-01 00:00:00+00:00 1 -31 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -32 2020-01-02 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -33 2020-01-03 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -34 2020-01-04 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -35 2020-01-05 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -36 2020-01-06 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -37 2020-01-07 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -38 2020-01-08 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -39 2020-01-09 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -40 2020-01-10 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -41 2020-01-11 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -42 2020-01-12 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -43 2020-01-13 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -44 2020-01-14 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -45 2020-01-15 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -46 2020-01-16 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -47 2020-01-17 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -48 2020-01-18 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -49 2020-01-19 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -50 2020-01-20 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -51 2020-01-21 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -52 2020-01-22 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -53 2020-01-23 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -54 2020-01-24 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -55 2020-01-25 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -56 2020-01-26 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -57 2020-01-27 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -58 2020-01-28 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -59 2020-01-29 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -60 2020-01-30 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 -61 2020-01-31 00:00:00+00:00 2020-01-01 00:00:00+00:00 2020-01-01 00:00:00+00:00 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt index 0a53d0d5d8..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 00:00:00+00:00 1 -1 2019-12-02 00:00:00+00:00 1 -2 2019-12-03 00:00:00+00:00 1 -3 2019-12-04 00:00:00+00:00 1 -4 2019-12-05 00:00:00+00:00 1 -5 2019-12-06 00:00:00+00:00 1 -6 2019-12-07 00:00:00+00:00 1 -7 2019-12-08 00:00:00+00:00 1 -8 2019-12-09 00:00:00+00:00 1 -9 2019-12-10 00:00:00+00:00 1 -10 2019-12-11 00:00:00+00:00 1 -11 2019-12-12 00:00:00+00:00 1 -12 2019-12-13 00:00:00+00:00 1 -13 2019-12-14 00:00:00+00:00 1 -14 2019-12-15 00:00:00+00:00 1 -15 2019-12-16 00:00:00+00:00 1 -16 2019-12-17 00:00:00+00:00 1 -17 2019-12-18 00:00:00+00:00 1 -18 2019-12-19 00:00:00+00:00 1 -19 2019-12-20 00:00:00+00:00 1 -20 2019-12-21 00:00:00+00:00 1 -21 2019-12-22 00:00:00+00:00 1 -22 2019-12-23 00:00:00+00:00 1 -23 2019-12-24 00:00:00+00:00 1 -24 2019-12-25 00:00:00+00:00 1 -25 2019-12-26 00:00:00+00:00 1 -26 2019-12-27 00:00:00+00:00 1 -27 2019-12-28 00:00:00+00:00 1 -28 2019-12-29 00:00:00+00:00 1 -29 2019-12-30 00:00:00+00:00 1 -30 2019-12-31 00:00:00+00:00 1 -31 2020-01-01 00:00:00+00:00 5 -32 2020-01-02 00:00:00+00:00 5 -33 2020-01-03 00:00:00+00:00 5 -34 2020-01-04 00:00:00+00:00 5 -35 2020-01-05 00:00:00+00:00 5 -36 2020-01-06 00:00:00+00:00 5 -37 2020-01-07 00:00:00+00:00 5 -38 2020-01-08 00:00:00+00:00 5 -39 2020-01-09 00:00:00+00:00 5 -40 2020-01-10 00:00:00+00:00 5 -41 2020-01-11 00:00:00+00:00 5 -42 2020-01-12 00:00:00+00:00 5 -43 2020-01-13 00:00:00+00:00 5 -44 2020-01-14 00:00:00+00:00 5 -45 2020-01-15 00:00:00+00:00 5 -46 2020-01-16 00:00:00+00:00 5 -47 2020-01-17 00:00:00+00:00 5 -48 2020-01-18 00:00:00+00:00 5 -49 2020-01-19 00:00:00+00:00 5 -50 2020-01-20 00:00:00+00:00 5 -51 2020-01-21 00:00:00+00:00 5 -52 2020-01-22 00:00:00+00:00 5 -53 2020-01-23 00:00:00+00:00 5 -54 2020-01-24 00:00:00+00:00 5 -55 2020-01-25 00:00:00+00:00 5 -56 2020-01-26 00:00:00+00:00 5 -57 2020-01-27 00:00:00+00:00 5 -58 2020-01-28 00:00:00+00:00 5 -59 2020-01-29 00:00:00+00:00 5 -60 2020-01-30 00:00:00+00:00 5 -61 2020-01-31 00:00:00+00:00 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt index 8875d9a563..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt index d339e19f8a..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt index 8875d9a563..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt index d339e19f8a..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt index 8875d9a563..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt index d339e19f8a..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt index ba72aba37c..e3fa7695c5 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - METRIC_TIME__DAY METRIC_TIME__MONTH METRIC_TIME__YEAR BOOKINGS_AT_START_OF_MONTH -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +METRIC_TIME__DAY METRIC_TIME__MONTH METRIC_TIME__YEAR BOOKINGS_AT_START_OF_MONTH +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt index 911eba604f..85dbad0bb9 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - METRIC_TIME__DAY BOOKINGS_AT_START_OF_MONTH -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +METRIC_TIME__DAY BOOKINGS_AT_START_OF_MONTH +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt index 8875d9a563..2d091b3d6f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day metric_time__month metric_time__year bookings_at_start_of_month -0 2019-12-01 2019-12-01 2019-01-01 1 -1 2019-12-02 2019-12-01 2019-01-01 1 -2 2019-12-03 2019-12-01 2019-01-01 1 -3 2019-12-04 2019-12-01 2019-01-01 1 -4 2019-12-05 2019-12-01 2019-01-01 1 -5 2019-12-06 2019-12-01 2019-01-01 1 -6 2019-12-07 2019-12-01 2019-01-01 1 -7 2019-12-08 2019-12-01 2019-01-01 1 -8 2019-12-09 2019-12-01 2019-01-01 1 -9 2019-12-10 2019-12-01 2019-01-01 1 -10 2019-12-11 2019-12-01 2019-01-01 1 -11 2019-12-12 2019-12-01 2019-01-01 1 -12 2019-12-13 2019-12-01 2019-01-01 1 -13 2019-12-14 2019-12-01 2019-01-01 1 -14 2019-12-15 2019-12-01 2019-01-01 1 -15 2019-12-16 2019-12-01 2019-01-01 1 -16 2019-12-17 2019-12-01 2019-01-01 1 -17 2019-12-18 2019-12-01 2019-01-01 1 -18 2019-12-19 2019-12-01 2019-01-01 1 -19 2019-12-20 2019-12-01 2019-01-01 1 -20 2019-12-21 2019-12-01 2019-01-01 1 -21 2019-12-22 2019-12-01 2019-01-01 1 -22 2019-12-23 2019-12-01 2019-01-01 1 -23 2019-12-24 2019-12-01 2019-01-01 1 -24 2019-12-25 2019-12-01 2019-01-01 1 -25 2019-12-26 2019-12-01 2019-01-01 1 -26 2019-12-27 2019-12-01 2019-01-01 1 -27 2019-12-28 2019-12-01 2019-01-01 1 -28 2019-12-29 2019-12-01 2019-01-01 1 -29 2019-12-30 2019-12-01 2019-01-01 1 -30 2019-12-31 2019-12-01 2019-01-01 1 -31 2020-01-01 2020-01-01 2020-01-01 5 -32 2020-01-02 2020-01-01 2020-01-01 5 -33 2020-01-03 2020-01-01 2020-01-01 5 -34 2020-01-04 2020-01-01 2020-01-01 5 -35 2020-01-05 2020-01-01 2020-01-01 5 -36 2020-01-06 2020-01-01 2020-01-01 5 -37 2020-01-07 2020-01-01 2020-01-01 5 -38 2020-01-08 2020-01-01 2020-01-01 5 -39 2020-01-09 2020-01-01 2020-01-01 5 -40 2020-01-10 2020-01-01 2020-01-01 5 -41 2020-01-11 2020-01-01 2020-01-01 5 -42 2020-01-12 2020-01-01 2020-01-01 5 -43 2020-01-13 2020-01-01 2020-01-01 5 -44 2020-01-14 2020-01-01 2020-01-01 5 -45 2020-01-15 2020-01-01 2020-01-01 5 -46 2020-01-16 2020-01-01 2020-01-01 5 -47 2020-01-17 2020-01-01 2020-01-01 5 -48 2020-01-18 2020-01-01 2020-01-01 5 -49 2020-01-19 2020-01-01 2020-01-01 5 -50 2020-01-20 2020-01-01 2020-01-01 5 -51 2020-01-21 2020-01-01 2020-01-01 5 -52 2020-01-22 2020-01-01 2020-01-01 5 -53 2020-01-23 2020-01-01 2020-01-01 5 -54 2020-01-24 2020-01-01 2020-01-01 5 -55 2020-01-25 2020-01-01 2020-01-01 5 -56 2020-01-26 2020-01-01 2020-01-01 5 -57 2020-01-27 2020-01-01 2020-01-01 5 -58 2020-01-28 2020-01-01 2020-01-01 5 -59 2020-01-29 2020-01-01 2020-01-01 5 -60 2020-01-30 2020-01-01 2020-01-01 5 -61 2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------ -------------------- ------------------- ---------------------------- +2019-12-01 2019-12-01 2019-01-01 1 +2019-12-02 2019-12-01 2019-01-01 1 +2019-12-03 2019-12-01 2019-01-01 1 +2019-12-04 2019-12-01 2019-01-01 1 +2019-12-05 2019-12-01 2019-01-01 1 +2019-12-06 2019-12-01 2019-01-01 1 +2019-12-07 2019-12-01 2019-01-01 1 +2019-12-08 2019-12-01 2019-01-01 1 +2019-12-09 2019-12-01 2019-01-01 1 +2019-12-10 2019-12-01 2019-01-01 1 +2019-12-11 2019-12-01 2019-01-01 1 +2019-12-12 2019-12-01 2019-01-01 1 +2019-12-13 2019-12-01 2019-01-01 1 +2019-12-14 2019-12-01 2019-01-01 1 +2019-12-15 2019-12-01 2019-01-01 1 +2019-12-16 2019-12-01 2019-01-01 1 +2019-12-17 2019-12-01 2019-01-01 1 +2019-12-18 2019-12-01 2019-01-01 1 +2019-12-19 2019-12-01 2019-01-01 1 +2019-12-20 2019-12-01 2019-01-01 1 +2019-12-21 2019-12-01 2019-01-01 1 +2019-12-22 2019-12-01 2019-01-01 1 +2019-12-23 2019-12-01 2019-01-01 1 +2019-12-24 2019-12-01 2019-01-01 1 +2019-12-25 2019-12-01 2019-01-01 1 +2019-12-26 2019-12-01 2019-01-01 1 +2019-12-27 2019-12-01 2019-01-01 1 +2019-12-28 2019-12-01 2019-01-01 1 +2019-12-29 2019-12-01 2019-01-01 1 +2019-12-30 2019-12-01 2019-01-01 1 +2019-12-31 2019-12-01 2019-01-01 1 +2020-01-01 2020-01-01 2020-01-01 5 +2020-01-02 2020-01-01 2020-01-01 5 +2020-01-03 2020-01-01 2020-01-01 5 +2020-01-04 2020-01-01 2020-01-01 5 +2020-01-05 2020-01-01 2020-01-01 5 +2020-01-06 2020-01-01 2020-01-01 5 +2020-01-07 2020-01-01 2020-01-01 5 +2020-01-08 2020-01-01 2020-01-01 5 +2020-01-09 2020-01-01 2020-01-01 5 +2020-01-10 2020-01-01 2020-01-01 5 +2020-01-11 2020-01-01 2020-01-01 5 +2020-01-12 2020-01-01 2020-01-01 5 +2020-01-13 2020-01-01 2020-01-01 5 +2020-01-14 2020-01-01 2020-01-01 5 +2020-01-15 2020-01-01 2020-01-01 5 +2020-01-16 2020-01-01 2020-01-01 5 +2020-01-17 2020-01-01 2020-01-01 5 +2020-01-18 2020-01-01 2020-01-01 5 +2020-01-19 2020-01-01 2020-01-01 5 +2020-01-20 2020-01-01 2020-01-01 5 +2020-01-21 2020-01-01 2020-01-01 5 +2020-01-22 2020-01-01 2020-01-01 5 +2020-01-23 2020-01-01 2020-01-01 5 +2020-01-24 2020-01-01 2020-01-01 5 +2020-01-25 2020-01-01 2020-01-01 5 +2020-01-26 2020-01-01 2020-01-01 5 +2020-01-27 2020-01-01 2020-01-01 5 +2020-01-28 2020-01-01 2020-01-01 5 +2020-01-29 2020-01-01 2020-01-01 5 +2020-01-30 2020-01-01 2020-01-01 5 +2020-01-31 2020-01-01 2020-01-01 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt index d339e19f8a..9d5ae89a93 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,63 +1,64 @@ - metric_time__day bookings_at_start_of_month -0 2019-12-01 1 -1 2019-12-02 1 -2 2019-12-03 1 -3 2019-12-04 1 -4 2019-12-05 1 -5 2019-12-06 1 -6 2019-12-07 1 -7 2019-12-08 1 -8 2019-12-09 1 -9 2019-12-10 1 -10 2019-12-11 1 -11 2019-12-12 1 -12 2019-12-13 1 -13 2019-12-14 1 -14 2019-12-15 1 -15 2019-12-16 1 -16 2019-12-17 1 -17 2019-12-18 1 -18 2019-12-19 1 -19 2019-12-20 1 -20 2019-12-21 1 -21 2019-12-22 1 -22 2019-12-23 1 -23 2019-12-24 1 -24 2019-12-25 1 -25 2019-12-26 1 -26 2019-12-27 1 -27 2019-12-28 1 -28 2019-12-29 1 -29 2019-12-30 1 -30 2019-12-31 1 -31 2020-01-01 5 -32 2020-01-02 5 -33 2020-01-03 5 -34 2020-01-04 5 -35 2020-01-05 5 -36 2020-01-06 5 -37 2020-01-07 5 -38 2020-01-08 5 -39 2020-01-09 5 -40 2020-01-10 5 -41 2020-01-11 5 -42 2020-01-12 5 -43 2020-01-13 5 -44 2020-01-14 5 -45 2020-01-15 5 -46 2020-01-16 5 -47 2020-01-17 5 -48 2020-01-18 5 -49 2020-01-19 5 -50 2020-01-20 5 -51 2020-01-21 5 -52 2020-01-22 5 -53 2020-01-23 5 -54 2020-01-24 5 -55 2020-01-25 5 -56 2020-01-26 5 -57 2020-01-27 5 -58 2020-01-28 5 -59 2020-01-29 5 -60 2020-01-30 5 -61 2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------ ---------------------------- +2019-12-01 1 +2019-12-02 1 +2019-12-03 1 +2019-12-04 1 +2019-12-05 1 +2019-12-06 1 +2019-12-07 1 +2019-12-08 1 +2019-12-09 1 +2019-12-10 1 +2019-12-11 1 +2019-12-12 1 +2019-12-13 1 +2019-12-14 1 +2019-12-15 1 +2019-12-16 1 +2019-12-17 1 +2019-12-18 1 +2019-12-19 1 +2019-12-20 1 +2019-12-21 1 +2019-12-22 1 +2019-12-23 1 +2019-12-24 1 +2019-12-25 1 +2019-12-26 1 +2019-12-27 1 +2019-12-28 1 +2019-12-29 1 +2019-12-30 1 +2019-12-31 1 +2020-01-01 5 +2020-01-02 5 +2020-01-03 5 +2020-01-04 5 +2020-01-05 5 +2020-01-06 5 +2020-01-07 5 +2020-01-08 5 +2020-01-09 5 +2020-01-10 5 +2020-01-11 5 +2020-01-12 5 +2020-01-13 5 +2020-01-14 5 +2020-01-15 5 +2020-01-16 5 +2020-01-17 5 +2020-01-18 5 +2020-01-19 5 +2020-01-20 5 +2020-01-21 5 +2020-01-22 5 +2020-01-23 5 +2020-01-24 5 +2020-01-25 5 +2020-01-26 5 +2020-01-27 5 +2020-01-28 5 +2020-01-29 5 +2020-01-30 5 +2020-01-31 5 From 3ed8f0c6fc9a909dc51c591a50afc375cf7d9e08 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 8 May 2024 03:30:06 -0700 Subject: [PATCH 06/15] Rename strings similar to "dataframe". --- .../dbt_connectors/adapter_backed_client.py | 2 +- dbt-metricflow/dbt_metricflow/cli/main.py | 2 +- .../dataflow/builder/dataflow_plan_builder.py | 6 +++--- metricflow/dataflow/dataflow_plan.py | 5 ++--- .../dataflow/nodes/write_to_dataframe.py | 12 ++++++------ .../source_scan/cm_branch_combiner.py | 6 +++--- .../source_scan/source_scan_optimizer.py | 6 +++--- metricflow/engine/metricflow_engine.py | 2 +- metricflow/execution/dataflow_to_execution.py | 4 ++-- metricflow/execution/execution_plan.py | 4 ++-- metricflow/plan_conversion/dataflow_to_sql.py | 6 +++--- metricflow/protocols/sql_client.py | 2 +- tests_metricflow/compare_df.py | 6 +++--- .../source_scan/test_cm_branch_combiner.py | 4 ++-- .../source_scan/test_source_scan_optimizer.py | 4 ++-- tests_metricflow/execution/test_tasks.py | 6 +++--- .../sql_clients/adapter_backed_ddl_client.py | 10 +++++----- .../fixtures/sql_clients/ddl_sql_client.py | 6 +++--- .../inference/context/test_snowflake.py | 2 +- .../integration/test_configured_cases.py | 4 ++-- .../test_dataflow_to_sql_plan.py | 11 ++++++----- tests_metricflow/sql/compare_data_table.py | 2 +- .../sql_clients/test_date_time_operations.py | 18 +++++++++--------- .../sql_clients/test_sql_client.py | 8 ++++---- .../table_snapshot/table_snapshots.py | 6 +++--- .../table_snapshot/test_source_schema.py | 4 ++-- .../table_snapshot/test_table_snapshots.py | 6 +++--- 27 files changed, 77 insertions(+), 77 deletions(-) diff --git a/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py b/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py index 39e524071e..4dcc8a8f84 100644 --- a/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py +++ b/dbt-metricflow/dbt_metricflow/cli/dbt_connectors/adapter_backed_client.py @@ -128,7 +128,7 @@ def query( stmt: str, sql_bind_parameters: SqlBindParameters = SqlBindParameters(), ) -> MetricFlowDataTable: - """Query statement; result expected to be data which will be returned as a DataFrame. + """Query statement; result expected to be data which will be returned as a DataTable. Args: stmt: The SQL query statement to run. This should produce output via a SELECT diff --git a/dbt-metricflow/dbt_metricflow/cli/main.py b/dbt-metricflow/dbt_metricflow/cli/main.py index f8dda90028..71afb1ddd3 100644 --- a/dbt-metricflow/dbt_metricflow/cli/main.py +++ b/dbt-metricflow/dbt_metricflow/cli/main.py @@ -209,7 +209,7 @@ def tutorial(ctx: click.core.Context, cfg: CLIContext, msg: bool, clean: bool) - "--csv", type=click.File("wb"), required=False, - help="Provide filepath for dataframe output to csv", + help="Provide filepath for data_table output to csv", ) @click.option( "--explain", diff --git a/metricflow/dataflow/builder/dataflow_plan_builder.py b/metricflow/dataflow/builder/dataflow_plan_builder.py index 9b017caaa4..3f0eabcb8e 100644 --- a/metricflow/dataflow/builder/dataflow_plan_builder.py +++ b/metricflow/dataflow/builder/dataflow_plan_builder.py @@ -79,7 +79,7 @@ from metricflow.dataflow.nodes.order_by_limit import OrderByLimitNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.dataflow_plan_optimizer import DataflowPlanOptimizer from metricflow.dataset.dataset_classes import DataSet @@ -144,7 +144,7 @@ def build_plan( output_selection_specs: Optional[InstanceSpecSet] = None, optimizers: Sequence[DataflowPlanOptimizer] = (), ) -> DataflowPlan: - """Generate a plan for reading the results of a query with the given spec into a dataframe or table.""" + """Generate a plan for reading the results of a query with the given spec into a data_table or table.""" # Workaround for a Pycharm type inspection issue with decorators. # noinspection PyArgumentList return self._build_plan( @@ -738,7 +738,7 @@ def build_sink_node( write_result_node: DataflowPlanNode if not output_sql_table: - write_result_node = WriteToResultDataframeNode(parent_node=pre_result_node or parent_node) + write_result_node = WriteToResultDataTableNode(parent_node=pre_result_node or parent_node) else: write_result_node = WriteToResultTableNode( parent_node=pre_result_node or parent_node, output_sql_table=output_sql_table diff --git a/metricflow/dataflow/dataflow_plan.py b/metricflow/dataflow/dataflow_plan.py index e110df0719..6a817a6b8d 100644 --- a/metricflow/dataflow/dataflow_plan.py +++ b/metricflow/dataflow/dataflow_plan.py @@ -10,7 +10,6 @@ import more_itertools from metricflow_semantics.dag.id_prefix import StaticIdPrefix from metricflow_semantics.dag.mf_dag import DagId, DagNode, MetricFlowDag, NodeId -from metricflow_semantics.specs.spec_classes import LinkableInstanceSpec from metricflow_semantics.visitor import Visitable, VisitorOutputT if typing.TYPE_CHECKING: @@ -33,7 +32,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode - from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode + from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode @@ -147,7 +146,7 @@ def visit_where_constraint_node(self, node: WhereConstraintNode) -> VisitorOutpu pass @abstractmethod - def visit_write_to_result_dataframe_node(self, node: WriteToResultDataframeNode) -> VisitorOutputT: # noqa: D102 + def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode) -> VisitorOutputT: # noqa: D102 pass @abstractmethod diff --git a/metricflow/dataflow/nodes/write_to_dataframe.py b/metricflow/dataflow/nodes/write_to_dataframe.py index 7585385838..c10d59ae3d 100644 --- a/metricflow/dataflow/nodes/write_to_dataframe.py +++ b/metricflow/dataflow/nodes/write_to_dataframe.py @@ -11,8 +11,8 @@ ) -class WriteToResultDataframeNode(DataflowPlanNode): - """A node where incoming data gets written to a dataframe.""" +class WriteToResultDataTableNode(DataflowPlanNode): + """A node where incoming data gets written to a data_table.""" def __init__(self, parent_node: DataflowPlanNode) -> None: # noqa: D107 self._parent_node = parent_node @@ -23,11 +23,11 @@ def id_prefix(cls) -> IdPrefix: # noqa: D102 return StaticIdPrefix.DATAFLOW_NODE_WRITE_TO_RESULT_DATAFRAME_ID_PREFIX def accept(self, visitor: DataflowPlanNodeVisitor[VisitorOutputT]) -> VisitorOutputT: # noqa: D102 - return visitor.visit_write_to_result_dataframe_node(self) + return visitor.visit_write_to_result_data_table_node(self) @property def description(self) -> str: # noqa: D102 - return """Write to Dataframe""" + return """Write to DataTable""" @property def parent_node(self) -> DataflowPlanNode: # noqa: D102 @@ -39,6 +39,6 @@ def functionally_identical(self, other_node: DataflowPlanNode) -> bool: # noqa: def with_new_parents( # noqa: D102 self, new_parent_nodes: Sequence[DataflowPlanNode] - ) -> WriteToResultDataframeNode: + ) -> WriteToResultDataTableNode: assert len(new_parent_nodes) == 1 - return WriteToResultDataframeNode(parent_node=new_parent_nodes[0]) + return WriteToResultDataTableNode(parent_node=new_parent_nodes[0]) diff --git a/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py b/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py index e14e8a1ee7..df85d42cf1 100644 --- a/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py +++ b/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py @@ -26,7 +26,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.source_scan.matching_linkable_specs import MatchingLinkableSpecsTransform @@ -337,8 +337,8 @@ def visit_where_constraint_node( # noqa: D102 self._log_visit_node_type(node) return self._default_handler(node) - def visit_write_to_result_dataframe_node( # noqa: D102 - self, node: WriteToResultDataframeNode + def visit_write_to_result_data_table_node( # noqa: D102 + self, node: WriteToResultDataTableNode ) -> ComputeMetricsBranchCombinerResult: self._log_visit_node_type(node) return self._handle_unsupported_node(node) diff --git a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py index 38bc6c4a56..2ee6911517 100644 --- a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py +++ b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py @@ -28,7 +28,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.dataflow_plan_optimizer import DataflowPlanOptimizer from metricflow.dataflow.optimizer.source_scan.cm_branch_combiner import ( @@ -161,8 +161,8 @@ def visit_where_constraint_node(self, node: WhereConstraintNode) -> OptimizeBran self._log_visit_node_type(node) return self._default_base_output_handler(node) - def visit_write_to_result_dataframe_node( # noqa: D102 - self, node: WriteToResultDataframeNode + def visit_write_to_result_data_table_node( # noqa: D102 + self, node: WriteToResultDataTableNode ) -> OptimizeBranchResult: # noqa: D102 self._log_visit_node_type(node) return self._default_base_output_handler(node) diff --git a/metricflow/engine/metricflow_engine.py b/metricflow/engine/metricflow_engine.py index 19b7a2c654..f223e131a7 100644 --- a/metricflow/engine/metricflow_engine.py +++ b/metricflow/engine/metricflow_engine.py @@ -96,7 +96,7 @@ class MetricFlowQueryRequest: where_constraint: A SQL string using group by names that can be used like a where clause on the output data. order_by_names: metric and group by names to order by. A "-" can be used to specify reverse order e.g. "-ds". order_by: metric, dimension, or entity objects to order by. - output_table: If specified, output the result data to this table instead of a result dataframe. + output_table: If specified, output the result data to this table instead of a result data_table. sql_optimization_level: The level of optimization for the generated SQL. query_type: Type of MetricFlow query. """ diff --git a/metricflow/execution/dataflow_to_execution.py b/metricflow/execution/dataflow_to_execution.py index 534a7a94c2..e56924c332 100644 --- a/metricflow/execution/dataflow_to_execution.py +++ b/metricflow/execution/dataflow_to_execution.py @@ -25,7 +25,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.execution.convert_to_execution_plan import ConvertToExecutionPlanResult from metricflow.execution.execution_plan import ( @@ -74,7 +74,7 @@ def _render_sql(self, convert_to_sql_plan_result: ConvertToSqlPlanResult) -> Sql return self._sql_plan_renderer.render_sql_query_plan(convert_to_sql_plan_result.sql_plan) @override - def visit_write_to_result_dataframe_node(self, node: WriteToResultDataframeNode) -> ConvertToExecutionPlanResult: + def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode) -> ConvertToExecutionPlanResult: convert_to_sql_plan_result = self._convert_to_sql_plan(node) render_sql_result = self._render_sql(convert_to_sql_plan_result) execution_plan = ExecutionPlan( diff --git a/metricflow/execution/execution_plan.py b/metricflow/execution/execution_plan.py index 1664a14339..f28899d09c 100644 --- a/metricflow/execution/execution_plan.py +++ b/metricflow/execution/execution_plan.py @@ -82,12 +82,12 @@ class TaskExecutionResult: # If the task was an SQL query, it's stored here sql: Optional[str] = None bind_params: Optional[SqlBindParameters] = None - # If the task produces a dataframe as a result, it's stored here. + # If the task produces a data_table as a result, it's stored here. df: Optional[MetricFlowDataTable] = None class SelectSqlQueryToDataFrameTask(ExecutionPlanTask): - """A task that runs a SELECT and puts that result into a dataframe.""" + """A task that runs a SELECT and puts that result into a data_table.""" def __init__( # noqa: D107 self, diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index 770103da66..f639e84783 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -61,7 +61,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataset.dataset_classes import DataSet from metricflow.dataset.sql_dataset import SqlDataSet @@ -829,8 +829,8 @@ def visit_order_by_limit_node(self, node: OrderByLimitNode) -> SqlDataSet: # no ), ) - def visit_write_to_result_dataframe_node(self, node: WriteToResultDataframeNode) -> SqlDataSet: # noqa: D102 - # Returning the parent-node SQL as an approximation since you can't write to a dataframe via SQL. + def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode) -> SqlDataSet: # noqa: D102 + # Returning the parent-node SQL as an approximation since you can't write to a data_table via SQL. return node.parent_node.accept(self) def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> SqlDataSet: # noqa: D102 diff --git a/metricflow/protocols/sql_client.py b/metricflow/protocols/sql_client.py index e553026315..c2a9151116 100644 --- a/metricflow/protocols/sql_client.py +++ b/metricflow/protocols/sql_client.py @@ -53,7 +53,7 @@ def query( stmt: str, sql_bind_parameters: SqlBindParameters = SqlBindParameters(), ) -> MetricFlowDataTable: - """Base query method, upon execution will run a query that returns a pandas DataFrame.""" + """Base query method, upon execution will run a query that returns a pandas DataTable.""" raise NotImplementedError @abstractmethod diff --git a/tests_metricflow/compare_df.py b/tests_metricflow/compare_df.py index d9f6a0ff7d..2978be3689 100644 --- a/tests_metricflow/compare_df.py +++ b/tests_metricflow/compare_df.py @@ -45,17 +45,17 @@ def _dataframes_contain_same_data( return True -def assert_dataframes_equal( +def assert_data_tables_equal( actual: MetricFlowDataTable, expected: MetricFlowDataTable, sort_columns: bool = True, allow_empty: bool = False, compare_names_using_lowercase: bool = False, ) -> None: - """Check that contents of DataFrames are the same. + """Check that contents of DataTables are the same. If sort_columns is set to false, value and column order needs to be the same. - If compare_names_using_lowercase is set to True, we copy the dataframes and lower-case their names. + If compare_names_using_lowercase is set to True, we copy the data_tables and lower-case their names. This is useful for Snowflake query output comparisons. """ check_data_tables_are_equal( diff --git a/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py b/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py index f08d917117..d2e93f9160 100644 --- a/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py +++ b/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py @@ -16,7 +16,7 @@ DataflowPlanNode, ) from metricflow.dataflow.nodes.filter_elements import FilterElementsNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.optimizer.source_scan.cm_branch_combiner import ( ComputeMetricsBranchCombiner, ComputeMetricsBranchCombinerResult, @@ -27,7 +27,7 @@ def make_dataflow_plan(node: DataflowPlanNode) -> DataflowPlan: # noqa: D103 return DataflowPlan( - sink_nodes=[WriteToResultDataframeNode(node)], + sink_nodes=[WriteToResultDataTableNode(node)], plan_id=DagId.from_id_prefix(StaticIdPrefix.OPTIMIZED_DATAFLOW_PLAN_PREFIX), ) diff --git a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py index c83b2fe80b..23421c9de9 100644 --- a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py +++ b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py @@ -39,7 +39,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.source_scan.source_scan_optimizer import SourceScanOptimizer from metricflow.dataset.dataset_classes import DataSet @@ -72,7 +72,7 @@ def visit_order_by_limit_node(self, node: OrderByLimitNode) -> int: # noqa: D10 def visit_where_constraint_node(self, node: WhereConstraintNode) -> int: # noqa: D102 return self._sum_parents(node) - def visit_write_to_result_dataframe_node(self, node: WriteToResultDataframeNode) -> int: # noqa: D102 + def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode) -> int: # noqa: D102 return self._sum_parents(node) def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> int: # noqa: D102 diff --git a/tests_metricflow/execution/test_tasks.py b/tests_metricflow/execution/test_tasks.py index fe0c39010e..6ca227a05f 100644 --- a/tests_metricflow/execution/test_tasks.py +++ b/tests_metricflow/execution/test_tasks.py @@ -14,7 +14,7 @@ from metricflow.execution.executor import SequentialPlanExecutor from metricflow.protocols.sql_client import SqlClient, SqlEngine from metricflow.sql.sql_table import SqlTable -from tests_metricflow.compare_df import assert_dataframes_equal +from tests_metricflow.compare_df import assert_data_tables_equal def test_read_sql_task(sql_client: SqlClient) -> None: # noqa: D103 @@ -27,7 +27,7 @@ def test_read_sql_task(sql_client: SqlClient) -> None: # noqa: D103 assert not results.contains_task_errors assert task_result.df is not None - assert_dataframes_equal( + assert_data_tables_equal( actual=task_result.df, expected=MetricFlowDataTable.create_from_rows( column_names=["foo"], @@ -53,7 +53,7 @@ def test_write_table_task( # noqa: D103 assert not results.contains_task_errors - assert_dataframes_equal( + assert_data_tables_equal( actual=sql_client.query(f"SELECT * FROM {output_table.sql}"), expected=MetricFlowDataTable.create_from_rows( column_names=["foo"], diff --git a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py index 737a92c9e6..40552cc14e 100644 --- a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py +++ b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py @@ -17,22 +17,22 @@ class AdapterBackedDDLSqlClient(AdapterBackedSqlClient): """Extends the AdapterBackedSqlClient with the DDL methods necessary for test configuration and execution.""" - def create_table_from_dataframe( + def create_table_from_data_table( self, sql_table: SqlTable, df: MetricFlowDataTable, chunk_size: Optional[int] = None, ) -> None: - """Create a table in the data warehouse containing the contents of the dataframe. + """Create a table in the data warehouse containing the contents of the data_table. Only used in tutorials and tests. Args: sql_table: The SqlTable object representing the table location to use - df: The Pandas DataFrame object containing the column schema and data to load + df: The Pandas DataTable object containing the column schema and data to load chunk_size: The number of rows to insert per transaction """ - logger.info(f"Creating table '{sql_table.sql}' from a DataFrame with {df.row_count} row(s)") + logger.info(f"Creating table '{sql_table.sql}' from a DataTable with {df.row_count} row(s)") start_time = time.time() with self._adapter.connection_named("MetricFlow_create_from_dataframe"): @@ -111,7 +111,7 @@ def _get_sql_type(self, column_description: ColumnDescription) -> str: raise ValueError(f"Encountered unexpected {column_type=}!") def _quote_escape_value(self, value: str) -> str: - """Escape single quotes in string-like values for create_table_from_dataframe. + """Escape single quotes in string-like values for create_table_from_data_table. This is necessary because Databricks uses backslash as its escape character. We don't bother with the exhaustive switch here because we expect most engines diff --git a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py index f20b071305..8bc4ee8726 100644 --- a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py +++ b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py @@ -20,17 +20,17 @@ class SqlClientWithDDLMethods(SqlClient, Protocol): """ @abstractmethod - def create_table_from_dataframe( + def create_table_from_data_table( self, sql_table: SqlTable, df: MetricFlowDataTable, chunk_size: Optional[int] = None, ) -> None: - """Creates a table and populates it with the contents of the dataframe. + """Creates a table and populates it with the contents of the data_table. Args: sql_table: The SqlTable metadata of the table to create - df: The Pandas DataFrame with the contents of the target table + df: The Pandas DataTable with the contents of the target table chunk_size: The number of rows to write per query """ raise NotImplementedError diff --git a/tests_metricflow/inference/context/test_snowflake.py b/tests_metricflow/inference/context/test_snowflake.py index 6e8ca4b859..7a1fd00c0a 100644 --- a/tests_metricflow/inference/context/test_snowflake.py +++ b/tests_metricflow/inference/context/test_snowflake.py @@ -56,7 +56,7 @@ def test_context_provider() -> None: This test case currently mocks the Snowflake response with a `MagicMock`. This is not ideal and should probably be replaced by integration tests in the future. """ - # See for SHOW COLUMNS result dataframe spec: + # See for SHOW COLUMNS result data_table spec: # https://docs.snowflake.com/en/sql-reference/sql/show-columns.html show_columns_result_dict: Dict[str, List[Union[int, str]]] = { diff --git a/tests_metricflow/integration/test_configured_cases.py b/tests_metricflow/integration/test_configured_cases.py index c0e457bedf..cd46b7223e 100644 --- a/tests_metricflow/integration/test_configured_cases.py +++ b/tests_metricflow/integration/test_configured_cases.py @@ -36,7 +36,7 @@ SqlStringExpression, SqlSubtractTimeIntervalExpression, ) -from tests_metricflow.compare_df import assert_dataframes_equal +from tests_metricflow.compare_df import assert_data_tables_equal from tests_metricflow.integration.configured_test_case import ( CONFIGURED_INTEGRATION_TESTS_REPOSITORY, IntegrationTestModel, @@ -361,4 +361,4 @@ def test_case( ) # If we sort, it's effectively not checking the order whatever order that the output was would be overwritten. assert actual is not None, "Did not get a result table from MetricFlow" - assert_dataframes_equal(actual, expected, sort_columns=not case.check_order, allow_empty=case.allow_empty) + assert_data_tables_equal(actual, expected, sort_columns=not case.check_order, allow_empty=case.allow_empty) diff --git a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py index 3bf34c2236..4545de227d 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -50,7 +50,7 @@ from metricflow.dataflow.nodes.order_by_limit import OrderByLimitNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataframeNode +from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter from metricflow.protocols.sql_client import SqlClient from metricflow.sql.optimizer.optimization_levels import SqlQueryOptimizationLevel @@ -533,7 +533,7 @@ def test_compute_metrics_node_simple_expr( aggregated_to_elements={entity_spec, dimension_spec}, ) - sink_node = WriteToResultDataframeNode(compute_metrics_node) + sink_node = WriteToResultDataTableNode(compute_metrics_node) dataflow_plan = DataflowPlan(sink_nodes=[sink_node], plan_id=DagId.from_str("plan0")) assert_plan_snapshot_text_equal( @@ -605,7 +605,8 @@ def test_join_to_time_spine_node_without_offset( ), join_type=SqlJoinType.INNER, ) - sink_node = WriteToResultDataframeNode(join_to_time_spine_node) + + sink_node = WriteToResultDataTableNode(join_to_time_spine_node) dataflow_plan = DataflowPlan(sink_nodes=[sink_node], plan_id=DagId.from_str("plan0")) assert_plan_snapshot_text_equal( @@ -678,7 +679,7 @@ def test_join_to_time_spine_node_with_offset_window( join_type=SqlJoinType.INNER, ) - sink_node = WriteToResultDataframeNode(join_to_time_spine_node) + sink_node = WriteToResultDataTableNode(join_to_time_spine_node) dataflow_plan = DataflowPlan(sink_nodes=[sink_node], plan_id=DagId.from_str("plan0")) assert_plan_snapshot_text_equal( @@ -752,7 +753,7 @@ def test_join_to_time_spine_node_with_offset_to_grain( join_type=SqlJoinType.INNER, ) - sink_node = WriteToResultDataframeNode(join_to_time_spine_node) + sink_node = WriteToResultDataTableNode(join_to_time_spine_node) dataflow_plan = DataflowPlan(sink_nodes=[sink_node], plan_id=DagId.from_str("plan0")) assert_plan_snapshot_text_equal( diff --git a/tests_metricflow/sql/compare_data_table.py b/tests_metricflow/sql/compare_data_table.py index ece46f82a0..c33272789a 100644 --- a/tests_metricflow/sql/compare_data_table.py +++ b/tests_metricflow/sql/compare_data_table.py @@ -92,7 +92,7 @@ def check_data_tables_are_equal( ) -> None: """Check if this is equal to another table. If not, raise an exception. - This was migrated from an existing implementation based on `pandas` dataframes. + This was migrated from an existing implementation based on `pandas` data_tables. """ if ignore_order: expected_table = expected_table.sorted() diff --git a/tests_metricflow/sql_clients/test_date_time_operations.py b/tests_metricflow/sql_clients/test_date_time_operations.py index 5e96499b4b..247ce29379 100644 --- a/tests_metricflow/sql_clients/test_date_time_operations.py +++ b/tests_metricflow/sql_clients/test_date_time_operations.py @@ -36,8 +36,8 @@ logger = logging.getLogger(__name__) -def _extract_dataframe_value(df: MetricFlowDataTable) -> Any: # type: ignore[misc] - """Helper to assert that a query result has a single value, and return the value from the dataframe.""" +def _extract_data_table_value(df: MetricFlowDataTable) -> Any: # type: ignore[misc] + """Helper to assert that a query result has a single value, and return the value from the data_table.""" assert df.row_count == 1 assert df.column_count == 1 return df.get_cell_value(0, 0) @@ -64,7 +64,7 @@ def test_date_trunc_to_year(sql_client: SqlClient) -> None: df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -89,7 +89,7 @@ def test_date_trunc_to_quarter(sql_client: SqlClient, input: str, expected: date df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -113,7 +113,7 @@ def test_date_trunc_to_week(sql_client: SqlClient, input: str, expected: datetim df = sql_client.query(f"SELECT {date_trunc_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -138,7 +138,7 @@ def test_date_part_year(sql_client: SqlClient) -> None: df = sql_client.query(f"SELECT {extract_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -163,7 +163,7 @@ def test_date_part_quarter(sql_client: SqlClient, input: str, expected: int) -> df = sql_client.query(f"SELECT {extract_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -182,7 +182,7 @@ def test_date_part_day_of_year(sql_client: SqlClient) -> None: df = sql_client.query(f"SELECT {extract_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual @@ -206,5 +206,5 @@ def test_date_part_day_of_week(sql_client: SqlClient, input: str, expected: int) df = sql_client.query(f"SELECT {extract_stmt}") - actual = _extract_dataframe_value(df=df) + actual = _extract_data_table_value(df=df) assert expected == actual diff --git a/tests_metricflow/sql_clients/test_sql_client.py b/tests_metricflow/sql_clients/test_sql_client.py index dab3b062ca..65bfe34507 100644 --- a/tests_metricflow/sql_clients/test_sql_client.py +++ b/tests_metricflow/sql_clients/test_sql_client.py @@ -12,7 +12,7 @@ from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient, SqlEngine from metricflow.sql.sql_table import SqlTable -from tests_metricflow.compare_df import assert_dataframes_equal +from tests_metricflow.compare_df import assert_data_tables_equal from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods logger = logging.getLogger(__name__) @@ -47,7 +47,7 @@ def test_select_one_query(sql_client: SqlClient) -> None: # noqa: D103 sql_client.query("this is garbage") -def test_create_table_from_dataframe( # noqa: D103 +def test_create_table_from_data_table( # noqa: D103 mf_test_configuration: MetricFlowTestConfiguration, ddl_sql_client: SqlClientWithDDLMethods ) -> None: expected_df = MetricFlowDataTable.create_from_rows( @@ -61,10 +61,10 @@ def test_create_table_from_dataframe( # noqa: D103 ], ) sql_table = SqlTable(schema_name=mf_test_configuration.mf_system_schema, table_name=_random_table()) - ddl_sql_client.create_table_from_dataframe(sql_table=sql_table, df=expected_df) + ddl_sql_client.create_table_from_data_table(sql_table=sql_table, df=expected_df) actual_df = ddl_sql_client.query(f"SELECT * FROM {sql_table.sql}") - assert_dataframes_equal( + assert_data_tables_equal( actual=actual_df, expected=expected_df, compare_names_using_lowercase=ddl_sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, diff --git a/tests_metricflow/table_snapshot/table_snapshots.py b/tests_metricflow/table_snapshot/table_snapshots.py index c51de9e9d9..35aaa3216b 100644 --- a/tests_metricflow/table_snapshot/table_snapshots.py +++ b/tests_metricflow/table_snapshot/table_snapshots.py @@ -91,9 +91,9 @@ def _parse_bool_str(bool_str: str) -> bool: @property def as_df(self) -> MetricFlowDataTable: - """Return this snapshot as represented by an equivalent dataframe.""" + """Return this snapshot as represented by an equivalent data_table.""" # In the YAML files, all values are strings, but they need to be converted to defined type so that it can be - # properly represented in a dataframe + # properly represented in a data_table type_converted_rows = [] for row in self.rows: @@ -132,7 +132,7 @@ def __init__(self, ddl_sql_client: SqlClientWithDDLMethods, schema_name: str) -> def load(self, table_snapshot: SqlTableSnapshot) -> None: # noqa: D102 sql_table = SqlTable(schema_name=self._schema_name, table_name=table_snapshot.table_name) - self._ddl_sql_client.create_table_from_dataframe( + self._ddl_sql_client.create_table_from_data_table( sql_table=sql_table, df=table_snapshot.as_df, # Without this set, the insert queries may be too long. diff --git a/tests_metricflow/table_snapshot/test_source_schema.py b/tests_metricflow/table_snapshot/test_source_schema.py index 1eb03ed1e6..985d5c02c1 100644 --- a/tests_metricflow/table_snapshot/test_source_schema.py +++ b/tests_metricflow/table_snapshot/test_source_schema.py @@ -8,7 +8,7 @@ from metricflow.protocols.sql_client import SqlClient, SqlEngine from metricflow.sql.sql_table import SqlTable -from tests_metricflow.compare_df import assert_dataframes_equal +from tests_metricflow.compare_df import assert_data_tables_equal from tests_metricflow.fixtures.table_fixtures import CONFIGURED_SOURCE_TABLE_SNAPSHOT_REPOSITORY from tests_metricflow.source_schema_tools import get_populate_source_schema_shell_command from tests_metricflow.table_snapshot.table_snapshots import ( @@ -58,7 +58,7 @@ def test_validate_data_in_source_schema( sql_table = SqlTable(schema_name=schema_name, table_name=table_snapshot.table_name) expected_table_df = table_snapshot.as_df actual_table_df = sql_client.query(f"SELECT * FROM {sql_table.sql}") - assert_dataframes_equal( + assert_data_tables_equal( actual=actual_table_df, expected=expected_table_df, compare_names_using_lowercase=sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, diff --git a/tests_metricflow/table_snapshot/test_table_snapshots.py b/tests_metricflow/table_snapshot/test_table_snapshots.py index 1751b987ac..554acfb7e7 100644 --- a/tests_metricflow/table_snapshot/test_table_snapshots.py +++ b/tests_metricflow/table_snapshot/test_table_snapshots.py @@ -10,7 +10,7 @@ from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlEngine -from tests_metricflow.compare_df import assert_dataframes_equal +from tests_metricflow.compare_df import assert_data_tables_equal from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods from tests_metricflow.table_snapshot.table_snapshots import ( SqlTableColumnDefinition, @@ -44,7 +44,7 @@ def table_snapshot() -> SqlTableSnapshot: # noqa: D103 def test_as_df(table_snapshot: SqlTableSnapshot) -> None: """Check that SqlTableSnapshot.as_df works as expected.""" - assert_dataframes_equal( + assert_data_tables_equal( actual=table_snapshot.as_df, expected=MetricFlowDataTable.create_from_rows( column_names=[f"col{i}" for i in range(5)], @@ -71,7 +71,7 @@ def test_load( snapshot_loader.load(table_snapshot) actual = ddl_sql_client.query(f"SELECT * FROM {schema_name}.{table_snapshot.table_name}") - assert_dataframes_equal( + assert_data_tables_equal( actual=actual, expected=table_snapshot.as_df, compare_names_using_lowercase=ddl_sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, From 95e0e7e0199a7f10dc7f49552d48e1cccdf778da Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 8 May 2024 05:07:27 -0700 Subject: [PATCH 07/15] Update snapshots for `WriteToResultDataframeNode` rename. --- .../DataflowPlan/test_filter_combination__dfpo_0.xml | 6 +++--- .../test_read_sql_source_combination__dfpo_0.xml | 6 +++--- .../DataflowPlan/test_cyclic_join__dfp_0.xml | 6 +++--- .../DataflowPlan/test_common_semantic_model__dfp_0.xml | 6 +++--- ...ve_metric_no_window_or_grain_with_metric_time__dfp_0.xml | 6 +++--- ...metric_no_window_or_grain_without_metric_time__dfp_0.xml | 6 +++--- .../test_cumulative_metric_with_window__dfp_0.xml | 6 +++--- .../test_derived_metric_offset_to_grain__dfp_0.xml | 6 +++--- .../test_derived_metric_offset_window__dfp_0.xml | 6 +++--- .../test_derived_metric_offset_with_granularity__dfp_0.xml | 6 +++--- .../test_derived_offset_cumulative_metric__dfp_0.xml | 6 +++--- .../test_dimensions_with_time_constraint__dfp_0.xml | 6 +++--- .../DataflowPlan/test_distinct_values_plan__dfp_0.xml | 6 +++--- .../test_distinct_values_plan_with_join__dfp_0.xml | 6 +++--- ..._to_time_spine_if_no_time_dimension_requested__dfp_0.xml | 6 +++--- .../test_join_to_time_spine_derived_metric__dfp_0.xml | 6 +++--- .../test_join_to_time_spine_with_filters__dfp_0.xml | 6 +++--- .../test_join_to_time_spine_with_metric_time__dfp_0.xml | 6 +++--- .../test_join_to_time_spine_with_non_metric_time__dfp_0.xml | 6 +++--- .../DataflowPlan/test_joined_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_limit_rows_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_measure_constraint_plan__dfp_0.xml | 6 +++--- ...t_measure_constraint_with_reused_measure_plan__dfp_0.xml | 6 +++--- .../test_metric_in_metric_where_filter__dfp_0.xml | 6 +++--- .../test_metric_in_query_where_filter__dfp_0.xml | 6 +++--- .../DataflowPlan/test_metric_time_only__dfp_0.xml | 6 +++--- .../DataflowPlan/test_metric_time_quarter__dfp_0.xml | 6 +++--- .../test_metric_time_with_other_dimensions__dfp_0.xml | 6 +++--- .../DataflowPlan/test_min_max_metric_time__dfp_0.xml | 6 +++--- .../DataflowPlan/test_min_max_metric_time_week__dfp_0.xml | 6 +++--- .../DataflowPlan/test_min_max_only_categorical__dfp_0.xml | 6 +++--- .../DataflowPlan/test_min_max_only_time__dfp_0.xml | 6 +++--- .../DataflowPlan/test_min_max_only_time_year__dfp_0.xml | 6 +++--- .../test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_multihop_join_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_multiple_metrics_plan__dfp_0.xml | 6 +++--- .../test_nested_derived_metric_with_outer_offset__dfp_0.xml | 6 +++--- ...filter_and_query_have_different_granularities__dfp_0.xml | 6 +++--- ...filter_and_query_have_different_granularities__dfp_0.xml | 6 +++--- .../DataflowPlan/test_order_by_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_primary_entity_dimension__dfp_0.xml | 6 +++--- .../DataflowPlan/test_simple_plan__dfp_0.xml | 6 +++--- ...test_single_semantic_model_ratio_metrics_plan__dfp_0.xml | 6 +++--- .../DataflowPlan/test_where_constrained_plan__dfp_0.xml | 6 +++--- .../test_where_constrained_plan_time_dimension__dfp_0.xml | 6 +++--- ...t_where_constrained_with_common_linkable_plan__dfp_0.xml | 6 +++--- .../test_compute_metrics_node_simple_expr__plan0.xml | 6 +++--- ..._join_to_time_spine_node_with_offset_to_grain__plan0.xml | 6 +++--- ...st_join_to_time_spine_node_with_offset_window__plan0.xml | 6 +++--- .../test_join_to_time_spine_node_without_offset__plan0.xml | 6 +++--- .../test_2_metrics_from_1_semantic_model__dfp_0.xml | 6 +++--- .../test_2_metrics_from_1_semantic_model__dfpo_0.xml | 6 +++--- .../test_2_metrics_from_2_semantic_models__dfp_0.xml | 6 +++--- .../test_2_metrics_from_2_semantic_models__dfpo_0.xml | 6 +++--- .../test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml | 6 +++--- .../test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml | 6 +++--- .../test_3_metrics_from_2_semantic_models__dfp_0.xml | 6 +++--- .../test_3_metrics_from_2_semantic_models__dfpo_0.xml | 6 +++--- .../test_constrained_metric_not_combined__dfp_0.xml | 6 +++--- .../test_constrained_metric_not_combined__dfpo_0.xml | 6 +++--- .../DataflowPlan/test_derived_metric__dfp_0.xml | 6 +++--- .../DataflowPlan/test_derived_metric__dfpo_0.xml | 6 +++--- .../test_derived_metric_with_non_derived_metric__dfp_0.xml | 6 +++--- .../test_derived_metric_with_non_derived_metric__dfpo_0.xml | 6 +++--- .../DataflowPlan/test_duplicate_measures__dfp_0.xml | 6 +++--- .../DataflowPlan/test_duplicate_measures__dfpo_0.xml | 6 +++--- .../DataflowPlan/test_nested_derived_metric__dfp_0.xml | 6 +++--- .../DataflowPlan/test_nested_derived_metric__dfpo_0.xml | 6 +++--- 68 files changed, 204 insertions(+), 204 deletions(-) diff --git a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml index 94c4f2ae94..be089a9574 100644 --- a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -14,5 +14,5 @@ - + diff --git a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml index c8945bbbd0..d2271abfc4 100644 --- a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml @@ -1,11 +1,11 @@ - - + + - + diff --git a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml index 45c1d57b39..e913b52a4b 100644 --- a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -61,5 +61,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml index b90e88c3b1..5dccae39ad 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -141,5 +141,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml index 249648dbc9..b0c184db4d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -32,5 +32,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml index bdf008d11b..33f9fc76f8 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -27,5 +27,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml index 50491984fb..96ea00a4bd 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -32,5 +32,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml index a5a257879c..bc7da98f3e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -75,5 +75,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml index e6de8e98b7..b7b0209d66 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -49,5 +49,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml index dcf71e0b3b..d9ca9b4480 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -49,5 +49,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml index 4c67beb929..a01020b4ab 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -53,5 +53,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml index c83d58ff9a..95e5e4a303 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index aa28a6f20e..b582dc6c95 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -61,5 +61,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml index 4993c6a9ef..9c8345d092 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -88,5 +88,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml index f5c8b7f198..ca3d0e8227 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -27,5 +27,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml index 52adf3d335..b0302f1ac3 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -101,5 +101,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml index 9b15f6933d..1640b927ee 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -142,5 +142,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml index 1746d90073..7cab7e01e1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -39,5 +39,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml index ea4127768a..5b498724ca 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -33,5 +33,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml index 65069397ea..227386e31b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -77,5 +77,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml index 85e2ea8526..e0db8bfde2 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -33,5 +33,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index c6ff54aff1..1ddac764b9 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -366,5 +366,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index 0895a60889..212afd5307 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -143,5 +143,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml index 7c57dc644e..d6fdb718ed 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -113,5 +113,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml index 2ad14bb3e6..14829a5c07 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -133,5 +133,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml index 7c022eb461..66cab34841 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -18,5 +18,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml index b552c24d27..8681109851 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -18,5 +18,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml index 18c22f048b..d57c92a51c 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -61,5 +61,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml index 1645d5f2d5..72b29b2006 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -22,5 +22,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml index cbacca99f6..5a86800a4e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -22,5 +22,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml index e621dafcc3..86684220f1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -21,5 +21,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml index e179eec6c3..758d3d0c59 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -22,5 +22,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml index 0a407dfaf1..724432836d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -22,5 +22,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml index 73f42dfb84..b29c93a7e8 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -147,5 +147,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml index 2fd679eb48..f53e7c0ce1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -343,5 +343,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml index 5b9e047685..d2867a667f 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -69,5 +69,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml index 41cbb9e0d4..83552ed2f4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -68,5 +68,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml index 5f853f89f3..fc66b1ec39 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -141,5 +141,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml index e9bf5429b1..590612e4b7 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -250,5 +250,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml index fae7c8024b..7ba932194b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -39,5 +39,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml index 3037578d89..cf479cd665 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -32,5 +32,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml index 3037578d89..cf479cd665 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -32,5 +32,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml index f939bcdf1b..959067757b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -147,5 +147,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 159ef536f6..83a05ef65b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -171,5 +171,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index be86b5a087..79ae091ec1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -99,5 +99,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index 9a9099768e..044edaaee7 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -148,5 +148,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml index ae6b453518..aeae47c427 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml @@ -1,6 +1,6 @@ - - + + @@ -45,5 +45,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml index db5f888b40..7d725d6e47 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml @@ -1,6 +1,6 @@ - - + + @@ -44,5 +44,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml index 54346939ce..ad88440282 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml @@ -1,6 +1,6 @@ - - + + @@ -44,5 +44,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml index 3b4b79a879..104727cda1 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml @@ -1,6 +1,6 @@ - - + + @@ -44,5 +44,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml index b90e88c3b1..5dccae39ad 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -141,5 +141,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml index 3d6bb14838..d41d6fabaa 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -74,5 +74,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml index 61fc4c9a3a..0bf968b5aa 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -58,5 +58,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml index 98379316a2..ff9319fc5f 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -58,5 +58,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml index 4893ba9591..043ac63d08 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -128,5 +128,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml index cb79550f2a..7f00282d0b 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -39,5 +39,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml index c82dd54966..39de495060 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -84,5 +84,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml index 3eb6059ba7..6ef679c21b 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -60,5 +60,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index b50c194b2d..9e92b25ecf 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -102,5 +102,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml index f8ce353fab..1be231cc4b 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -102,5 +102,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml index c930f9d5dd..f77d573c61 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -63,5 +63,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml index f876a379f4..f8f0df21da 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -35,5 +35,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml index 6330621d54..d2cec259be 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -93,5 +93,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml index 5619800d39..6f7c7310c5 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -66,5 +66,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml index 86baa33c25..7edd301e94 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -68,5 +68,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml index b39e3b49b0..be6e77b322 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -34,5 +34,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml index 35e8e62b19..9a7c8a6c17 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml @@ -1,6 +1,6 @@ - - + + @@ -126,5 +126,5 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml index e5b37f70a9..af89a195c5 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml @@ -1,6 +1,6 @@ - - + + @@ -74,5 +74,5 @@ - + From ae53659ba6bb4b4f71abfb3c2c07bc84fd22428d Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 8 May 2024 03:32:48 -0700 Subject: [PATCH 08/15] Rename `write_to_dataframe.py` to `write_to_data_table.py`. --- metricflow-semantics/metricflow_semantics/dag/id_prefix.py | 2 +- metricflow/dataflow/builder/dataflow_plan_builder.py | 2 +- metricflow/dataflow/dataflow_plan.py | 2 +- .../nodes/{write_to_dataframe.py => write_to_data_table.py} | 2 +- metricflow/dataflow/nodes/write_to_table.py | 2 +- metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py | 2 +- .../dataflow/optimizer/source_scan/source_scan_optimizer.py | 2 +- metricflow/execution/dataflow_to_execution.py | 2 +- metricflow/plan_conversion/dataflow_to_sql.py | 2 +- .../dataflow/optimizer/source_scan/test_cm_branch_combiner.py | 2 +- .../optimizer/source_scan/test_source_scan_optimizer.py | 2 +- tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename metricflow/dataflow/nodes/{write_to_dataframe.py => write_to_data_table.py} (98%) diff --git a/metricflow-semantics/metricflow_semantics/dag/id_prefix.py b/metricflow-semantics/metricflow_semantics/dag/id_prefix.py index ceea1ddef9..7de99f3767 100644 --- a/metricflow-semantics/metricflow_semantics/dag/id_prefix.py +++ b/metricflow-semantics/metricflow_semantics/dag/id_prefix.py @@ -43,7 +43,7 @@ class StaticIdPrefix(IdPrefix, Enum, metaclass=EnumMetaClassHelper): DATAFLOW_NODE_PASS_FILTER_ELEMENTS_ID_PREFIX = "pfe" DATAFLOW_NODE_READ_SQL_SOURCE_ID_PREFIX = "rss" DATAFLOW_NODE_WHERE_CONSTRAINT_ID_PREFIX = "wcc" - DATAFLOW_NODE_WRITE_TO_RESULT_DATAFRAME_ID_PREFIX = "wrd" + DATAFLOW_NODE_WRITE_TO_RESULT_DATA_TABLE_ID_PREFIX = "wrd" DATAFLOW_NODE_WRITE_TO_RESULT_TABLE_ID_PREFIX = "wrt" DATAFLOW_NODE_COMBINE_AGGREGATED_OUTPUTS_ID_PREFIX = "cao" DATAFLOW_NODE_CONSTRAIN_TIME_RANGE_ID_PREFIX = "ctr" diff --git a/metricflow/dataflow/builder/dataflow_plan_builder.py b/metricflow/dataflow/builder/dataflow_plan_builder.py index 3f0eabcb8e..1177816451 100644 --- a/metricflow/dataflow/builder/dataflow_plan_builder.py +++ b/metricflow/dataflow/builder/dataflow_plan_builder.py @@ -79,7 +79,7 @@ from metricflow.dataflow.nodes.order_by_limit import OrderByLimitNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.dataflow_plan_optimizer import DataflowPlanOptimizer from metricflow.dataset.dataset_classes import DataSet diff --git a/metricflow/dataflow/dataflow_plan.py b/metricflow/dataflow/dataflow_plan.py index 6a817a6b8d..ecf2fc427b 100644 --- a/metricflow/dataflow/dataflow_plan.py +++ b/metricflow/dataflow/dataflow_plan.py @@ -32,7 +32,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode - from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode + from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode diff --git a/metricflow/dataflow/nodes/write_to_dataframe.py b/metricflow/dataflow/nodes/write_to_data_table.py similarity index 98% rename from metricflow/dataflow/nodes/write_to_dataframe.py rename to metricflow/dataflow/nodes/write_to_data_table.py index c10d59ae3d..3bd9d3e664 100644 --- a/metricflow/dataflow/nodes/write_to_dataframe.py +++ b/metricflow/dataflow/nodes/write_to_data_table.py @@ -20,7 +20,7 @@ def __init__(self, parent_node: DataflowPlanNode) -> None: # noqa: D107 @classmethod def id_prefix(cls) -> IdPrefix: # noqa: D102 - return StaticIdPrefix.DATAFLOW_NODE_WRITE_TO_RESULT_DATAFRAME_ID_PREFIX + return StaticIdPrefix.DATAFLOW_NODE_WRITE_TO_RESULT_DATA_TABLE_ID_PREFIX def accept(self, visitor: DataflowPlanNodeVisitor[VisitorOutputT]) -> VisitorOutputT: # noqa: D102 return visitor.visit_write_to_result_data_table_node(self) diff --git a/metricflow/dataflow/nodes/write_to_table.py b/metricflow/dataflow/nodes/write_to_table.py index fb5ebd4caf..b513754fee 100644 --- a/metricflow/dataflow/nodes/write_to_table.py +++ b/metricflow/dataflow/nodes/write_to_table.py @@ -32,7 +32,7 @@ def __init__( @classmethod def id_prefix(cls) -> IdPrefix: # noqa: D102 - return StaticIdPrefix.DATAFLOW_NODE_WRITE_TO_RESULT_DATAFRAME_ID_PREFIX + return StaticIdPrefix.DATAFLOW_NODE_WRITE_TO_RESULT_DATA_TABLE_ID_PREFIX def accept(self, visitor: DataflowPlanNodeVisitor[VisitorOutputT]) -> VisitorOutputT: # noqa: D102 return visitor.visit_write_to_result_table_node(self) diff --git a/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py b/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py index df85d42cf1..5d18f3121c 100644 --- a/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py +++ b/metricflow/dataflow/optimizer/source_scan/cm_branch_combiner.py @@ -26,7 +26,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.source_scan.matching_linkable_specs import MatchingLinkableSpecsTransform diff --git a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py index 2ee6911517..1fd708da21 100644 --- a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py +++ b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py @@ -28,7 +28,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.dataflow_plan_optimizer import DataflowPlanOptimizer from metricflow.dataflow.optimizer.source_scan.cm_branch_combiner import ( diff --git a/metricflow/execution/dataflow_to_execution.py b/metricflow/execution/dataflow_to_execution.py index e56924c332..221eb225e6 100644 --- a/metricflow/execution/dataflow_to_execution.py +++ b/metricflow/execution/dataflow_to_execution.py @@ -25,7 +25,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.execution.convert_to_execution_plan import ConvertToExecutionPlanResult from metricflow.execution.execution_plan import ( diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index f639e84783..61583774ca 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -61,7 +61,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataset.dataset_classes import DataSet from metricflow.dataset.sql_dataset import SqlDataSet diff --git a/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py b/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py index d2e93f9160..eaceb6465f 100644 --- a/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py +++ b/tests_metricflow/dataflow/optimizer/source_scan/test_cm_branch_combiner.py @@ -16,7 +16,7 @@ DataflowPlanNode, ) from metricflow.dataflow.nodes.filter_elements import FilterElementsNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.optimizer.source_scan.cm_branch_combiner import ( ComputeMetricsBranchCombiner, ComputeMetricsBranchCombinerResult, diff --git a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py index 23421c9de9..dba5380f04 100644 --- a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py +++ b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py @@ -39,7 +39,7 @@ from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.dataflow.nodes.write_to_table import WriteToResultTableNode from metricflow.dataflow.optimizer.source_scan.source_scan_optimizer import SourceScanOptimizer from metricflow.dataset.dataset_classes import DataSet diff --git a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py index 4545de227d..42e2eb8e3b 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -50,7 +50,7 @@ from metricflow.dataflow.nodes.order_by_limit import OrderByLimitNode from metricflow.dataflow.nodes.semi_additive_join import SemiAdditiveJoinNode from metricflow.dataflow.nodes.where_filter import WhereConstraintNode -from metricflow.dataflow.nodes.write_to_dataframe import WriteToResultDataTableNode +from metricflow.dataflow.nodes.write_to_data_table import WriteToResultDataTableNode from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter from metricflow.protocols.sql_client import SqlClient from metricflow.sql.optimizer.optimization_levels import SqlQueryOptimizationLevel From 47f4866afa886f96946c3ec007915a55e1da42ad Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 28 May 2024 17:55:55 -0700 Subject: [PATCH 09/15] Rename `SelectSqlQueryToDataFrameTask` to `SelectSqlQueryToDataTableTask`. --- metricflow/execution/dataflow_to_execution.py | 4 ++-- metricflow/execution/execution_plan.py | 2 +- tests_metricflow/execution/test_tasks.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/metricflow/execution/dataflow_to_execution.py b/metricflow/execution/dataflow_to_execution.py index 221eb225e6..fa0b7ccbbf 100644 --- a/metricflow/execution/dataflow_to_execution.py +++ b/metricflow/execution/dataflow_to_execution.py @@ -30,7 +30,7 @@ from metricflow.execution.convert_to_execution_plan import ConvertToExecutionPlanResult from metricflow.execution.execution_plan import ( ExecutionPlan, - SelectSqlQueryToDataFrameTask, + SelectSqlQueryToDataTableTask, SelectSqlQueryToTableTask, ) from metricflow.plan_conversion.convert_to_sql_plan import ConvertToSqlPlanResult @@ -79,7 +79,7 @@ def visit_write_to_result_data_table_node(self, node: WriteToResultDataTableNode render_sql_result = self._render_sql(convert_to_sql_plan_result) execution_plan = ExecutionPlan( leaf_tasks=( - SelectSqlQueryToDataFrameTask( + SelectSqlQueryToDataTableTask( sql_client=self._sql_client, sql_query=render_sql_result.sql, bind_parameters=render_sql_result.bind_parameters, diff --git a/metricflow/execution/execution_plan.py b/metricflow/execution/execution_plan.py index f28899d09c..5f3e8e6f18 100644 --- a/metricflow/execution/execution_plan.py +++ b/metricflow/execution/execution_plan.py @@ -86,7 +86,7 @@ class TaskExecutionResult: df: Optional[MetricFlowDataTable] = None -class SelectSqlQueryToDataFrameTask(ExecutionPlanTask): +class SelectSqlQueryToDataTableTask(ExecutionPlanTask): """A task that runs a SELECT and puts that result into a data_table.""" def __init__( # noqa: D107 diff --git a/tests_metricflow/execution/test_tasks.py b/tests_metricflow/execution/test_tasks.py index 6ca227a05f..3168476b8e 100644 --- a/tests_metricflow/execution/test_tasks.py +++ b/tests_metricflow/execution/test_tasks.py @@ -8,7 +8,7 @@ from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.execution.execution_plan import ( ExecutionPlan, - SelectSqlQueryToDataFrameTask, + SelectSqlQueryToDataTableTask, SelectSqlQueryToTableTask, ) from metricflow.execution.executor import SequentialPlanExecutor @@ -18,7 +18,7 @@ def test_read_sql_task(sql_client: SqlClient) -> None: # noqa: D103 - task = SelectSqlQueryToDataFrameTask(sql_client, "SELECT 1 AS foo", SqlBindParameters()) + task = SelectSqlQueryToDataTableTask(sql_client, "SELECT 1 AS foo", SqlBindParameters()) execution_plan = ExecutionPlan(leaf_tasks=[task], dag_id=DagId.from_str("plan0")) results = SequentialPlanExecutor().execute_plan(execution_plan) From 18086310f400dd59d2fdf087850e380fd3ce5a98 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 28 May 2024 18:17:31 -0700 Subject: [PATCH 10/15] Update snapshots for rename to `SelectSqlQueryToDataTableTask`. --- .../BigQuery/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml | 4 ++-- .../BigQuery/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../BigQuery/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../Databricks/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Databricks/test_joined_plan__ep_0.xml | 4 ++-- .../Databricks/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../Databricks/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../DuckDB/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../Postgres/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Postgres/test_joined_plan__ep_0.xml | 4 ++-- .../Postgres/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../Postgres/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../Redshift/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Redshift/test_joined_plan__ep_0.xml | 4 ++-- .../Redshift/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../Redshift/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../Snowflake/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml | 4 ++-- .../Snowflake/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../Snowflake/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Trino/test_joined_plan__ep_0.xml | 4 ++-- .../ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml | 4 ++-- .../Trino/test_small_combined_metrics_plan__ep_0.xml | 4 ++-- 28 files changed, 56 insertions(+), 56 deletions(-) diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml index e7279fbd12..64512a66a6 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml index 1f70c9467e..8fccf02d64 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml index 52203b0845..72dfca3d9f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml index 9045376fc5..b1df474f4c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml index 30ef3132d1..16ed0e7902 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -82,5 +82,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml index c46593dada..f231dbcccd 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -28,5 +28,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml index 7b5757bb91..03d2b9d006 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -37,5 +37,5 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml index 691fa0fb6c..38ff24ffce 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml @@ -1,5 +1,5 @@ - + @@ -43,5 +43,5 @@ - + From b6a313abd2b52982efbb19ee006445f9935ec0f1 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 28 May 2024 18:19:00 -0700 Subject: [PATCH 11/15] Rename `as_df` to `as_data_table`. --- tests_metricflow/table_snapshot/table_snapshots.py | 4 ++-- tests_metricflow/table_snapshot/test_source_schema.py | 2 +- tests_metricflow/table_snapshot/test_table_snapshots.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests_metricflow/table_snapshot/table_snapshots.py b/tests_metricflow/table_snapshot/table_snapshots.py index 35aaa3216b..b2474cc0d8 100644 --- a/tests_metricflow/table_snapshot/table_snapshots.py +++ b/tests_metricflow/table_snapshot/table_snapshots.py @@ -90,7 +90,7 @@ def _parse_bool_str(bool_str: str) -> bool: raise RuntimeError(f"Invalid string representation of a boolean: {bool_str}") @property - def as_df(self) -> MetricFlowDataTable: + def as_data_table(self) -> MetricFlowDataTable: """Return this snapshot as represented by an equivalent data_table.""" # In the YAML files, all values are strings, but they need to be converted to defined type so that it can be # properly represented in a data_table @@ -134,7 +134,7 @@ def load(self, table_snapshot: SqlTableSnapshot) -> None: # noqa: D102 self._ddl_sql_client.create_table_from_data_table( sql_table=sql_table, - df=table_snapshot.as_df, + df=table_snapshot.as_data_table, # Without this set, the insert queries may be too long. chunk_size=500, ) diff --git a/tests_metricflow/table_snapshot/test_source_schema.py b/tests_metricflow/table_snapshot/test_source_schema.py index 985d5c02c1..b866390fba 100644 --- a/tests_metricflow/table_snapshot/test_source_schema.py +++ b/tests_metricflow/table_snapshot/test_source_schema.py @@ -56,7 +56,7 @@ def test_validate_data_in_source_schema( for table_snapshot in matching_table_snapshots: try: sql_table = SqlTable(schema_name=schema_name, table_name=table_snapshot.table_name) - expected_table_df = table_snapshot.as_df + expected_table_df = table_snapshot.as_data_table actual_table_df = sql_client.query(f"SELECT * FROM {sql_table.sql}") assert_data_tables_equal( actual=actual_table_df, diff --git a/tests_metricflow/table_snapshot/test_table_snapshots.py b/tests_metricflow/table_snapshot/test_table_snapshots.py index 554acfb7e7..a9ac77003a 100644 --- a/tests_metricflow/table_snapshot/test_table_snapshots.py +++ b/tests_metricflow/table_snapshot/test_table_snapshots.py @@ -42,10 +42,10 @@ def table_snapshot() -> SqlTableSnapshot: # noqa: D103 ) -def test_as_df(table_snapshot: SqlTableSnapshot) -> None: +def test_as_data_table(table_snapshot: SqlTableSnapshot) -> None: """Check that SqlTableSnapshot.as_df works as expected.""" assert_data_tables_equal( - actual=table_snapshot.as_df, + actual=table_snapshot.as_data_table, expected=MetricFlowDataTable.create_from_rows( column_names=[f"col{i}" for i in range(5)], rows=( @@ -73,7 +73,7 @@ def test_load( actual = ddl_sql_client.query(f"SELECT * FROM {schema_name}.{table_snapshot.table_name}") assert_data_tables_equal( actual=actual, - expected=table_snapshot.as_df, + expected=table_snapshot.as_data_table, compare_names_using_lowercase=ddl_sql_client.sql_engine_type is SqlEngine.SNOWFLAKE, ) From a3c21103ef9f212e64d783d24729694c0b8fdf09 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Mon, 27 May 2024 17:55:51 -0700 Subject: [PATCH 12/15] Update `SnowflakeInferenceContextProvider` to use correct types. --- metricflow/inference/context/snowflake.py | 57 ++++++++++++++++------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/metricflow/inference/context/snowflake.py b/metricflow/inference/context/snowflake.py index 97c3684b71..a245718a10 100644 --- a/metricflow/inference/context/snowflake.py +++ b/metricflow/inference/context/snowflake.py @@ -2,6 +2,7 @@ import json +from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.inference.context.data_warehouse import ( ColumnProperties, DataWarehouseInferenceContextProvider, @@ -73,6 +74,22 @@ def _get_select_list_for_column_name(self, name: str, count_nulls: bool) -> str: return ", ".join(statements) + def _get_one_int(self, data_table: MetricFlowDataTable, column_name: str) -> int: + if len(data_table.rows) == 0: + raise ValueError("No rows in the data table") + + return_value = data_table.get_cell_value(0, data_table.column_name_index(column_name)) + + if isinstance(return_value, int): + return int(return_value) + raise RuntimeError(f"Unhandled case {return_value=}") + + def _get_one_str(self, data_table: MetricFlowDataTable, column_name: str) -> str: + if len(data_table.rows) == 0: + raise ValueError("No rows in the data table") + + return str(data_table.get_cell_value(0, data_table.column_name_index(column_name))) + def _get_table_properties(self, table: SqlTable) -> TableProperties: all_columns_query = f"SHOW COLUMNS IN TABLE {table.sql}" all_columns = self._client.query(all_columns_query) @@ -82,16 +99,16 @@ def _get_table_properties(self, table: SqlTable) -> TableProperties: col_nullable = {} select_lists = [] - for row in all_columns.itertuples(): + for row in all_columns.rows: column = SqlColumn.from_names( - db_name=row.database_name.lower(), - schema_name=row.schema_name.lower(), - table_name=row.table_name.lower(), - column_name=row.column_name.lower(), + db_name=str(row[all_columns.column_name_index("database_name")]).lower(), + schema_name=str(row[all_columns.column_name_index("schema_name")]).lower(), + table_name=str(row[all_columns.column_name_index("table_name")]).lower(), + column_name=str(row[all_columns.column_name_index("column_name")]).lower(), ) sql_column_list.append(column) - type_dict = json.loads(row.data_type) + type_dict = json.loads(str(row[all_columns.column_name_index("data_type")])) col_types[column] = self._column_type_from_show_columns_data_type(type_dict["type"]) col_nullable[column] = type_dict["nullable"] select_lists.append( @@ -104,22 +121,30 @@ def _get_table_properties(self, table: SqlTable) -> TableProperties: select_lists.append("COUNT(*) AS rowcount") select_list = ", ".join(select_lists) statistics_query = f"SELECT {select_list} FROM {table.sql} SAMPLE ({self.max_sample_size} ROWS)" - statistics_df = self._client.query(statistics_query) + statistics_data_table = self._client.query(statistics_query) column_props = [ ColumnProperties( column=column, type=col_types[column], is_nullable=col_nullable[column], - null_count=statistics_df[f"{column.column_name}_{SnowflakeInferenceContextProvider.COUNT_NULL_SUFFIX}"][ - 0 - ], - row_count=statistics_df["rowcount"][0], - distinct_row_count=statistics_df[ - f"{column.column_name}_{SnowflakeInferenceContextProvider.COUNT_DISTINCT_SUFFIX}" - ][0], - min_value=statistics_df[f"{column.column_name}_{SnowflakeInferenceContextProvider.MIN_SUFFIX}"][0], - max_value=statistics_df[f"{column.column_name}_{SnowflakeInferenceContextProvider.MAX_SUFFIX}"][0], + null_count=self._get_one_int( + statistics_data_table, + f"{column.column_name}_{SnowflakeInferenceContextProvider.COUNT_NULL_SUFFIX}", + ), + row_count=self._get_one_int(statistics_data_table, "rowcount"), + distinct_row_count=self._get_one_int( + statistics_data_table, + f"{column.column_name}_{SnowflakeInferenceContextProvider.COUNT_DISTINCT_SUFFIX}", + ), + min_value=self._get_one_str( + statistics_data_table, + f"{column.column_name}_{SnowflakeInferenceContextProvider.MIN_SUFFIX}", + ), + max_value=self._get_one_str( + statistics_data_table, + f"{column.column_name}_{SnowflakeInferenceContextProvider.MAX_SUFFIX}", + ), ) for column in sql_column_list ] From 0ece9eff33aa89e3bb7e74c5a73e13402d5e453d Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 29 May 2024 18:03:54 -0700 Subject: [PATCH 13/15] Update the CLI to use corresponding methods for the data table. --- dbt-metricflow/dbt_metricflow/cli/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-metricflow/dbt_metricflow/cli/main.py b/dbt-metricflow/dbt_metricflow/cli/main.py index 71afb1ddd3..0308965e14 100644 --- a/dbt-metricflow/dbt_metricflow/cli/main.py +++ b/dbt-metricflow/dbt_metricflow/cli/main.py @@ -334,14 +334,14 @@ def query( df = query_result.result_df # Show the data if returned successfully if df is not None: - if df.empty: + if df.row_count == 0: click.echo("🕳 Successful MQL query returned an empty result set.") elif csv is not None: # csv is a LazyFile that is file-like that works in this case. df.to_csv(csv, index=False) # type: ignore click.echo(f"🖨 Successfully written query output to {csv.name}") else: - click.echo(df.to_markdown(index=False, floatfmt=f".{decimals}f")) + click.echo(df.text_format(decimals)) if display_plans: temp_path = tempfile.mkdtemp() From 19beaba1b942802f7aa1f3e795521b32900fc951 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Sun, 2 Jun 2024 22:29:29 -0700 Subject: [PATCH 14/15] Address comments. --- metricflow/data_table/mf_table.py | 7 +------ tests_metricflow/sql/compare_data_table.py | 10 ++++++---- tests_metricflow/sql_clients/test_sql_client.py | 9 ++++++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/metricflow/data_table/mf_table.py b/metricflow/data_table/mf_table.py index 5634d1680d..e7136a420f 100644 --- a/metricflow/data_table/mf_table.py +++ b/metricflow/data_table/mf_table.py @@ -95,8 +95,6 @@ def column_values_iterator(self, column_index: int) -> Iterator[CellValue]: return (row[column_index] for row in self.rows) def _sorted_by_column_name(self) -> MetricFlowDataTable: # noqa: D102 - # row_dict_by_row_index: Dict[int, Dict[str, CellType]] = defaultdict(dict) - new_rows: List[List[CellValue]] = [[] for _ in range(self.row_count)] sorted_column_names = sorted(self.column_names) for column_name in sorted_column_names: @@ -142,10 +140,7 @@ def text_format(self, float_decimals: int = 2) -> str: continue if isinstance(cell_value, datetime.datetime): - if cell_value.time() == datetime.time.min: - str_row.append(cell_value.date().isoformat()) - else: - str_row.append(cell_value.isoformat()) + str_row.append(cell_value.isoformat()) continue str_row.append(str(cell_value)) diff --git a/tests_metricflow/sql/compare_data_table.py b/tests_metricflow/sql/compare_data_table.py index c33272789a..88d058315e 100644 --- a/tests_metricflow/sql/compare_data_table.py +++ b/tests_metricflow/sql/compare_data_table.py @@ -94,14 +94,16 @@ def check_data_tables_are_equal( This was migrated from an existing implementation based on `pandas` data_tables. """ - if ignore_order: - expected_table = expected_table.sorted() - actual_table = actual_table.sorted() - if compare_column_names_using_lowercase: expected_table = expected_table.with_lower_case_column_names() actual_table = actual_table.with_lower_case_column_names() + # Sort after case changes since the order can change after a case change. e.g. underscore comes + # before lowercase. + if ignore_order: + expected_table = expected_table.sorted() + actual_table = actual_table.sorted() + if expected_table.column_names != actual_table.column_names: raise ValueError( mf_pformat_many( diff --git a/tests_metricflow/sql_clients/test_sql_client.py b/tests_metricflow/sql_clients/test_sql_client.py index 65bfe34507..a6a2ac23cb 100644 --- a/tests_metricflow/sql_clients/test_sql_client.py +++ b/tests_metricflow/sql_clients/test_sql_client.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Set, Union +from typing import Optional, Set, Union import pytest from dbt_semantic_interfaces.test_utils import as_datetime @@ -26,13 +26,16 @@ def _select_x_as_y(x: int = 1, y: str = "y") -> str: return f"SELECT {x} AS {y}" -def _check_1col(df: MetricFlowDataTable, col: str = "y", vals: Set[Union[int, str]] = {1}) -> None: +def _check_1col(df: MetricFlowDataTable, col: str = "y", vals: Optional[Set[Union[int, str]]] = None) -> None: """Helper to check that 1 column has the same value and a case-insensitive matching name. We lower-case the names due to snowflake's tendency to capitalize things. This isn't ideal but it'll do for now. """ + if vals is None: + vals = {1} + assert df.column_count == 1 - assert df.column_names == (col,) + assert tuple(column_name.lower() for column_name in df.column_names) == (col.lower(),) assert set(df.column_values_iterator(0)) == vals From 027afbbc86b556d7ab15dbc3674570a6b7bc95ef Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Sun, 2 Jun 2024 22:56:15 -0700 Subject: [PATCH 15/15] Update snapshots. --- .../BigQuery/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../DuckDB/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Postgres/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Redshift/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- .../Trino/test_saved_query__cli_output.txt | 22 +-- ...ery_with_cumulative_metric__cli_output.txt | 6 +- ...est_saved_query_with_limit__cli_output.txt | 10 +- ...est_saved_query_with_where__cli_output.txt | 14 +- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...th_non_adjustable_filter__query_output.txt | 8 +- ...o_date_cumulative_metric__query_output.txt | 12 +- ...tiple_cumulative_metrics__query_output.txt | 128 ++++++------ ...ditive_cumulative_metric__query_output.txt | 10 +- ...simple_cumulative_metric__query_output.txt | 184 +++++++++--------- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...ith_0_multi_metric_query__query_output.txt | 84 ++++---- ...th_categorical_dimension__query_output.txt | 34 ++-- ...nulls_with_0_metric_time__query_output.txt | 84 ++++---- ..._fill_nulls_with_0_month__query_output.txt | 48 ++--- ...imple_join_to_time_spine__query_output.txt | 84 ++++---- ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ ...h_multiple_granularities__query_output.txt | 128 ++++++------ ..._with_single_granularity__query_output.txt | 128 ++++++------ 112 files changed, 3444 insertions(+), 3444 deletions(-) diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt index 2eb499f1ce..87ea93583d 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt index 17df4cd3be..e32120ace0 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- -2020-01-01 1000 +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt index 9e82d183da..1227379dab 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt index b0bbf87c09..846ae9bae4 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt index 61ce8ab64f..0f30ef0efd 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt @@ -1,11 +1,11 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-01 4 2 1 -2020-01-02 4 3 3 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-01T00:00:00 4 2 1 +2020-01-02T00:00:00 4 3 3 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt index 019a53d94a..3293139487 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,3 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-01-01 1000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt index e16479fcf3..01b1c56e28 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt @@ -1,5 +1,5 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-18 4 4 2 -2019-12-19 4 6 6 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-18T00:00:00 4 4 2 +2019-12-19T00:00:00 4 6 6 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt index ea74e46753..c5cd7d3f3e 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt @@ -1,7 +1,7 @@ -metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ -2019-12-01 5 1 0 -2019-12-19 5 2 0 -2019-12-20 5 2 0 -2020-01-02 5 1 0 -2020-01-03 5 1 0 +metric_time__day listing__capacity_latest bookings instant_bookings +------------------- -------------------------- ---------- ------------------ +2019-12-01T00:00:00 5 1 0 +2019-12-19T00:00:00 5 2 0 +2019-12-20T00:00:00 5 2 0 +2020-01-02T00:00:00 5 1 0 +2020-01-03T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 28a873d53c..14e167761d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt index 3deebfe4e4..7eb99e5572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -METRIC_TIME__DAY REVENUE_MTD ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +METRIC_TIME__DAY REVENUE_MTD +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt index ac2a83e912..42e941e275 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -METRIC_TIME__DAY REVENUE_ALL_TIME TRAILING_2_MONTHS_REVENUE ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +METRIC_TIME__DAY REVENUE_ALL_TIME TRAILING_2_MONTHS_REVENUE +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt index 65bedb24fc..70d2042561 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -METRIC_TIME__DAY EVERY_TWO_DAYS_BOOKERS ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +METRIC_TIME__DAY EVERY_TWO_DAYS_BOOKERS +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt index 0ff1b72c63..d047459452 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 307efd49dd..147b09a352 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,4 +1,4 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-03-15 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-03-15T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt index a51dd95668..7d44fb1284 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,6 +1,6 @@ -metric_time__day revenue_mtd ------------------- ------------- -2021-01-03 3000 -2021-01-04 4000 -2021-01-05 4000 -2021-01-06 4000 +metric_time__day revenue_mtd +------------------- ------------- +2021-01-03T00:00:00 3000 +2021-01-04T00:00:00 4000 +2021-01-05T00:00:00 4000 +2021-01-06T00:00:00 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt index 0bf8a20dd9..c3c09258c1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- -2020-03-31 8000 7000 -2020-04-01 8000 3000 -2020-04-02 12000 7000 -2020-04-03 12000 7000 -2020-04-04 12000 7000 -2020-04-05 12000 7000 -2020-04-06 12000 7000 -2020-04-07 12000 7000 -2020-04-08 12000 7000 -2020-04-09 12000 7000 -2020-04-10 12000 7000 -2020-04-11 12000 7000 -2020-04-12 12000 7000 -2020-04-13 12000 7000 -2020-04-14 12000 7000 -2020-04-15 12000 7000 -2020-04-16 12000 7000 -2020-04-17 12000 7000 -2020-04-18 12000 7000 -2020-04-19 12000 7000 -2020-04-20 12000 7000 -2020-04-21 12000 7000 -2020-04-22 12000 7000 -2020-04-23 12000 7000 -2020-04-24 12000 7000 -2020-04-25 12000 7000 -2020-04-26 12000 7000 -2020-04-27 12000 7000 -2020-04-28 12000 7000 -2020-04-29 12000 7000 -2020-04-30 12000 7000 -2020-05-01 12000 4000 -2020-05-02 12000 4000 -2020-05-03 12000 4000 -2020-05-04 12000 4000 -2020-05-05 12000 4000 -2020-05-06 12000 4000 -2020-05-07 12000 4000 -2020-05-08 12000 4000 -2020-05-09 12000 4000 -2020-05-10 12000 4000 -2020-05-11 12000 4000 -2020-05-12 12000 4000 -2020-05-13 12000 4000 -2020-05-14 12000 4000 -2020-05-15 12000 4000 -2020-05-16 12000 4000 -2020-05-17 12000 4000 -2020-05-18 12000 4000 -2020-05-19 12000 4000 -2020-05-20 12000 4000 -2020-05-21 12000 4000 -2020-05-22 12000 4000 -2020-05-23 12000 4000 -2020-05-24 12000 4000 -2020-05-25 12000 4000 -2020-05-26 12000 4000 -2020-05-27 12000 4000 -2020-05-28 12000 4000 -2020-05-29 12000 4000 -2020-05-30 12000 4000 -2020-05-31 12000 4000 +metric_time__day revenue_all_time trailing_2_months_revenue +------------------- ------------------ --------------------------- +2020-03-31T00:00:00 8000 7000 +2020-04-01T00:00:00 8000 3000 +2020-04-02T00:00:00 12000 7000 +2020-04-03T00:00:00 12000 7000 +2020-04-04T00:00:00 12000 7000 +2020-04-05T00:00:00 12000 7000 +2020-04-06T00:00:00 12000 7000 +2020-04-07T00:00:00 12000 7000 +2020-04-08T00:00:00 12000 7000 +2020-04-09T00:00:00 12000 7000 +2020-04-10T00:00:00 12000 7000 +2020-04-11T00:00:00 12000 7000 +2020-04-12T00:00:00 12000 7000 +2020-04-13T00:00:00 12000 7000 +2020-04-14T00:00:00 12000 7000 +2020-04-15T00:00:00 12000 7000 +2020-04-16T00:00:00 12000 7000 +2020-04-17T00:00:00 12000 7000 +2020-04-18T00:00:00 12000 7000 +2020-04-19T00:00:00 12000 7000 +2020-04-20T00:00:00 12000 7000 +2020-04-21T00:00:00 12000 7000 +2020-04-22T00:00:00 12000 7000 +2020-04-23T00:00:00 12000 7000 +2020-04-24T00:00:00 12000 7000 +2020-04-25T00:00:00 12000 7000 +2020-04-26T00:00:00 12000 7000 +2020-04-27T00:00:00 12000 7000 +2020-04-28T00:00:00 12000 7000 +2020-04-29T00:00:00 12000 7000 +2020-04-30T00:00:00 12000 7000 +2020-05-01T00:00:00 12000 4000 +2020-05-02T00:00:00 12000 4000 +2020-05-03T00:00:00 12000 4000 +2020-05-04T00:00:00 12000 4000 +2020-05-05T00:00:00 12000 4000 +2020-05-06T00:00:00 12000 4000 +2020-05-07T00:00:00 12000 4000 +2020-05-08T00:00:00 12000 4000 +2020-05-09T00:00:00 12000 4000 +2020-05-10T00:00:00 12000 4000 +2020-05-11T00:00:00 12000 4000 +2020-05-12T00:00:00 12000 4000 +2020-05-13T00:00:00 12000 4000 +2020-05-14T00:00:00 12000 4000 +2020-05-15T00:00:00 12000 4000 +2020-05-16T00:00:00 12000 4000 +2020-05-17T00:00:00 12000 4000 +2020-05-18T00:00:00 12000 4000 +2020-05-19T00:00:00 12000 4000 +2020-05-20T00:00:00 12000 4000 +2020-05-21T00:00:00 12000 4000 +2020-05-22T00:00:00 12000 4000 +2020-05-23T00:00:00 12000 4000 +2020-05-24T00:00:00 12000 4000 +2020-05-25T00:00:00 12000 4000 +2020-05-26T00:00:00 12000 4000 +2020-05-27T00:00:00 12000 4000 +2020-05-28T00:00:00 12000 4000 +2020-05-29T00:00:00 12000 4000 +2020-05-30T00:00:00 12000 4000 +2020-05-31T00:00:00 12000 4000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt index ab06f83868..3ef788b572 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt @@ -1,5 +1,5 @@ -metric_time__day every_two_days_bookers ------------------- ------------------------ -2020-01-01 3 -2020-01-02 6 -2020-01-03 4 +metric_time__day every_two_days_bookers +------------------- ------------------------ +2020-01-01T00:00:00 3 +2020-01-02T00:00:00 6 +2020-01-03T00:00:00 4 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt index 9642fee650..c42416a36e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt @@ -1,92 +1,92 @@ -metric_time__day trailing_2_months_revenue ------------------- --------------------------- -2020-02-01 5000 -2020-02-02 5000 -2020-02-03 5000 -2020-02-04 5000 -2020-02-05 5000 -2020-02-06 5000 -2020-02-07 5000 -2020-02-08 5000 -2020-02-09 5000 -2020-02-10 5000 -2020-02-11 5000 -2020-02-12 5000 -2020-02-13 5000 -2020-02-14 5000 -2020-02-15 5000 -2020-02-16 5000 -2020-02-17 5000 -2020-02-18 5000 -2020-02-19 5000 -2020-02-20 5000 -2020-02-21 5000 -2020-02-22 5000 -2020-02-23 5000 -2020-02-24 5000 -2020-02-25 5000 -2020-02-26 5000 -2020-02-27 5000 -2020-02-28 5000 -2020-02-29 5000 -2020-03-01 7000 -2020-03-02 7000 -2020-03-03 7000 -2020-03-04 7000 -2020-03-05 7000 -2020-03-06 7000 -2020-03-07 7000 -2020-03-08 7000 -2020-03-09 7000 -2020-03-10 7000 -2020-03-11 7000 -2020-03-12 7000 -2020-03-13 7000 -2020-03-14 7000 -2020-03-15 7000 -2020-03-16 7000 -2020-03-17 7000 -2020-03-18 7000 -2020-03-19 7000 -2020-03-20 7000 -2020-03-21 7000 -2020-03-22 7000 -2020-03-23 7000 -2020-03-24 7000 -2020-03-25 7000 -2020-03-26 7000 -2020-03-27 7000 -2020-03-28 7000 -2020-03-29 7000 -2020-03-30 7000 -2020-03-31 7000 -2020-04-01 3000 -2020-04-02 7000 -2020-04-03 7000 -2020-04-04 7000 -2020-04-05 7000 -2020-04-06 7000 -2020-04-07 7000 -2020-04-08 7000 -2020-04-09 7000 -2020-04-10 7000 -2020-04-11 7000 -2020-04-12 7000 -2020-04-13 7000 -2020-04-14 7000 -2020-04-15 7000 -2020-04-16 7000 -2020-04-17 7000 -2020-04-18 7000 -2020-04-19 7000 -2020-04-20 7000 -2020-04-21 7000 -2020-04-22 7000 -2020-04-23 7000 -2020-04-24 7000 -2020-04-25 7000 -2020-04-26 7000 -2020-04-27 7000 -2020-04-28 7000 -2020-04-29 7000 -2020-04-30 7000 +metric_time__day trailing_2_months_revenue +------------------- --------------------------- +2020-02-01T00:00:00 5000 +2020-02-02T00:00:00 5000 +2020-02-03T00:00:00 5000 +2020-02-04T00:00:00 5000 +2020-02-05T00:00:00 5000 +2020-02-06T00:00:00 5000 +2020-02-07T00:00:00 5000 +2020-02-08T00:00:00 5000 +2020-02-09T00:00:00 5000 +2020-02-10T00:00:00 5000 +2020-02-11T00:00:00 5000 +2020-02-12T00:00:00 5000 +2020-02-13T00:00:00 5000 +2020-02-14T00:00:00 5000 +2020-02-15T00:00:00 5000 +2020-02-16T00:00:00 5000 +2020-02-17T00:00:00 5000 +2020-02-18T00:00:00 5000 +2020-02-19T00:00:00 5000 +2020-02-20T00:00:00 5000 +2020-02-21T00:00:00 5000 +2020-02-22T00:00:00 5000 +2020-02-23T00:00:00 5000 +2020-02-24T00:00:00 5000 +2020-02-25T00:00:00 5000 +2020-02-26T00:00:00 5000 +2020-02-27T00:00:00 5000 +2020-02-28T00:00:00 5000 +2020-02-29T00:00:00 5000 +2020-03-01T00:00:00 7000 +2020-03-02T00:00:00 7000 +2020-03-03T00:00:00 7000 +2020-03-04T00:00:00 7000 +2020-03-05T00:00:00 7000 +2020-03-06T00:00:00 7000 +2020-03-07T00:00:00 7000 +2020-03-08T00:00:00 7000 +2020-03-09T00:00:00 7000 +2020-03-10T00:00:00 7000 +2020-03-11T00:00:00 7000 +2020-03-12T00:00:00 7000 +2020-03-13T00:00:00 7000 +2020-03-14T00:00:00 7000 +2020-03-15T00:00:00 7000 +2020-03-16T00:00:00 7000 +2020-03-17T00:00:00 7000 +2020-03-18T00:00:00 7000 +2020-03-19T00:00:00 7000 +2020-03-20T00:00:00 7000 +2020-03-21T00:00:00 7000 +2020-03-22T00:00:00 7000 +2020-03-23T00:00:00 7000 +2020-03-24T00:00:00 7000 +2020-03-25T00:00:00 7000 +2020-03-26T00:00:00 7000 +2020-03-27T00:00:00 7000 +2020-03-28T00:00:00 7000 +2020-03-29T00:00:00 7000 +2020-03-30T00:00:00 7000 +2020-03-31T00:00:00 7000 +2020-04-01T00:00:00 3000 +2020-04-02T00:00:00 7000 +2020-04-03T00:00:00 7000 +2020-04-04T00:00:00 7000 +2020-04-05T00:00:00 7000 +2020-04-06T00:00:00 7000 +2020-04-07T00:00:00 7000 +2020-04-08T00:00:00 7000 +2020-04-09T00:00:00 7000 +2020-04-10T00:00:00 7000 +2020-04-11T00:00:00 7000 +2020-04-12T00:00:00 7000 +2020-04-13T00:00:00 7000 +2020-04-14T00:00:00 7000 +2020-04-15T00:00:00 7000 +2020-04-16T00:00:00 7000 +2020-04-17T00:00:00 7000 +2020-04-18T00:00:00 7000 +2020-04-19T00:00:00 7000 +2020-04-20T00:00:00 7000 +2020-04-21T00:00:00 7000 +2020-04-22T00:00:00 7000 +2020-04-23T00:00:00 7000 +2020-04-24T00:00:00 7000 +2020-04-25T00:00:00 7000 +2020-04-26T00:00:00 7000 +2020-04-27T00:00:00 7000 +2020-04-28T00:00:00 7000 +2020-04-29T00:00:00 7000 +2020-04-30T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index dfdbd0b22d..3277f0473d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 None 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 None 3 1 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 None 3 1 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index dfdbd0b22d..3277f0473d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 None 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 None 3 1 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 None 3 1 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 0350ccd172..c59590b747 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-19 None 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-02 None 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-02T00:00:00 None 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 0350ccd172..c59590b747 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-19 None 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-02 None 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-02T00:00:00 None 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 0350ccd172..c59590b747 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-19 None 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-02 None 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-02T00:00:00 None 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 5a2b2892a8..348ea40466 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 VIEWS ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 VIEWS +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 5f35d9f5c4..0215f88a57 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -METRIC_TIME__DAY LISTING__IS_LUX_LATEST BOOKINGS_FILL_NULLS_WITH_0_WITHOUT_TIME_SPINE VIEWS ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-19 None 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-02 None 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +METRIC_TIME__DAY LISTING__IS_LUX_LATEST BOOKINGS_FILL_NULLS_WITH_0_WITHOUT_TIME_SPINE VIEWS +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-02T00:00:00 None 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ca823bce3f..bdd65d9741 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +METRIC_TIME__DAY BOOKINGS_FILL_NULLS_WITH_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt index 74a4be149d..524c6a02f6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ METRIC_TIME__MONTH BOOKINGS_FILL_NULLS_WITH_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt index a0dcc995c9..7e8685a50b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt index ce9627c6e4..c70bb40bf0 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- -2019-11-27 0 None -2019-11-28 0 None -2019-11-29 0 None -2019-11-30 0 None -2019-12-01 1 None -2019-12-02 0 None -2019-12-03 0 None -2019-12-04 0 None -2019-12-05 0 None -2019-12-06 0 None -2019-12-07 0 None -2019-12-08 0 None -2019-12-09 0 None -2019-12-10 0 None -2019-12-11 0 None -2019-12-12 0 None -2019-12-13 0 None -2019-12-14 0 None -2019-12-15 0 None -2019-12-16 0 None -2019-12-17 0 None -2019-12-18 10 None -2019-12-19 18 None -2019-12-20 2 None -2019-12-21 0 None -2019-12-22 0 None -2019-12-23 0 None -2019-12-24 0 None -2019-12-25 0 None -2019-12-26 0 None -2019-12-27 0 None -2019-12-28 0 None -2019-12-29 0 None -2019-12-30 0 None -2019-12-31 0 None -2020-01-01 5 2 -2020-01-02 9 5 -2020-01-03 1 None -2020-01-04 0 1 -2020-01-05 0 1 +metric_time__day bookings_fill_nulls_with_0 views +------------------- ---------------------------- ------- +2019-11-27T00:00:00 0 None +2019-11-28T00:00:00 0 None +2019-11-29T00:00:00 0 None +2019-11-30T00:00:00 0 None +2019-12-01T00:00:00 1 None +2019-12-02T00:00:00 0 None +2019-12-03T00:00:00 0 None +2019-12-04T00:00:00 0 None +2019-12-05T00:00:00 0 None +2019-12-06T00:00:00 0 None +2019-12-07T00:00:00 0 None +2019-12-08T00:00:00 0 None +2019-12-09T00:00:00 0 None +2019-12-10T00:00:00 0 None +2019-12-11T00:00:00 0 None +2019-12-12T00:00:00 0 None +2019-12-13T00:00:00 0 None +2019-12-14T00:00:00 0 None +2019-12-15T00:00:00 0 None +2019-12-16T00:00:00 0 None +2019-12-17T00:00:00 0 None +2019-12-18T00:00:00 10 None +2019-12-19T00:00:00 18 None +2019-12-20T00:00:00 2 None +2019-12-21T00:00:00 0 None +2019-12-22T00:00:00 0 None +2019-12-23T00:00:00 0 None +2019-12-24T00:00:00 0 None +2019-12-25T00:00:00 0 None +2019-12-26T00:00:00 0 None +2019-12-27T00:00:00 0 None +2019-12-28T00:00:00 0 None +2019-12-29T00:00:00 0 None +2019-12-30T00:00:00 0 None +2019-12-31T00:00:00 0 None +2020-01-01T00:00:00 5 2 +2020-01-02T00:00:00 9 5 +2020-01-03T00:00:00 1 None +2020-01-04T00:00:00 0 1 +2020-01-05T00:00:00 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 0350ccd172..c59590b747 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,17 +1,17 @@ -metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- -2019-12-01 True 1 None -2019-12-18 False 4 None -2019-12-18 True 6 None -2019-12-19 False 6 None -2019-12-19 True 6 None -2019-12-19 None 6 None -2019-12-20 True 2 None -2020-01-01 False 2 None -2020-01-01 True 3 2 -2020-01-02 False 3 3 -2020-01-02 True 3 1 -2020-01-02 None 3 1 -2020-01-03 True 1 None -2020-01-04 False 0 1 -2020-01-05 None 0 1 +metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views +------------------- ------------------------ ----------------------------------------------- ------- +2019-12-01T00:00:00 True 1 None +2019-12-18T00:00:00 False 4 None +2019-12-18T00:00:00 True 6 None +2019-12-19T00:00:00 False 6 None +2019-12-19T00:00:00 True 6 None +2019-12-19T00:00:00 None 6 None +2019-12-20T00:00:00 True 2 None +2020-01-01T00:00:00 False 2 None +2020-01-01T00:00:00 True 3 2 +2020-01-02T00:00:00 False 3 3 +2020-01-02T00:00:00 True 3 1 +2020-01-02T00:00:00 None 3 1 +2020-01-03T00:00:00 True 1 None +2020-01-04T00:00:00 False 0 1 +2020-01-05T00:00:00 None 0 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ba26c8390b..acca77988d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_fill_nulls_with_0 ------------------- ---------------------------- -2019-11-27 0 -2019-11-28 0 -2019-11-29 0 -2019-11-30 0 -2019-12-01 1 -2019-12-02 0 -2019-12-03 0 -2019-12-04 0 -2019-12-05 0 -2019-12-06 0 -2019-12-07 0 -2019-12-08 0 -2019-12-09 0 -2019-12-10 0 -2019-12-11 0 -2019-12-12 0 -2019-12-13 0 -2019-12-14 0 -2019-12-15 0 -2019-12-16 0 -2019-12-17 0 -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 0 -2019-12-22 0 -2019-12-23 0 -2019-12-24 0 -2019-12-25 0 -2019-12-26 0 -2019-12-27 0 -2019-12-28 0 -2019-12-29 0 -2019-12-30 0 -2019-12-31 0 -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 0 -2020-01-05 0 +metric_time__day bookings_fill_nulls_with_0 +------------------- ---------------------------- +2019-11-27T00:00:00 0 +2019-11-28T00:00:00 0 +2019-11-29T00:00:00 0 +2019-11-30T00:00:00 0 +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 0 +2019-12-03T00:00:00 0 +2019-12-04T00:00:00 0 +2019-12-05T00:00:00 0 +2019-12-06T00:00:00 0 +2019-12-07T00:00:00 0 +2019-12-08T00:00:00 0 +2019-12-09T00:00:00 0 +2019-12-10T00:00:00 0 +2019-12-11T00:00:00 0 +2019-12-12T00:00:00 0 +2019-12-13T00:00:00 0 +2019-12-14T00:00:00 0 +2019-12-15T00:00:00 0 +2019-12-16T00:00:00 0 +2019-12-17T00:00:00 0 +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 0 +2019-12-22T00:00:00 0 +2019-12-23T00:00:00 0 +2019-12-24T00:00:00 0 +2019-12-25T00:00:00 0 +2019-12-26T00:00:00 0 +2019-12-27T00:00:00 0 +2019-12-28T00:00:00 0 +2019-12-29T00:00:00 0 +2019-12-30T00:00:00 0 +2019-12-31T00:00:00 0 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 0 +2020-01-05T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt index 404f3e9d73..c63eb2656b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,26 +1,26 @@ metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- -2019-01-01 0 -2019-02-01 0 -2019-03-01 0 -2019-04-01 0 -2019-05-01 0 -2019-06-01 0 -2019-07-01 0 -2019-08-01 0 -2019-09-01 0 -2019-10-01 0 -2019-11-01 0 -2019-12-01 31 -2020-01-01 15 -2020-02-01 0 -2020-03-01 0 -2020-04-01 0 -2020-05-01 0 -2020-06-01 0 -2020-07-01 0 -2020-08-01 0 -2020-09-01 0 -2020-10-01 0 -2020-11-01 0 -2020-12-01 0 +2019-01-01T00:00:00 0 +2019-02-01T00:00:00 0 +2019-03-01T00:00:00 0 +2019-04-01T00:00:00 0 +2019-05-01T00:00:00 0 +2019-06-01T00:00:00 0 +2019-07-01T00:00:00 0 +2019-08-01T00:00:00 0 +2019-09-01T00:00:00 0 +2019-10-01T00:00:00 0 +2019-11-01T00:00:00 0 +2019-12-01T00:00:00 31 +2020-01-01T00:00:00 15 +2020-02-01T00:00:00 0 +2020-03-01T00:00:00 0 +2020-04-01T00:00:00 0 +2020-05-01T00:00:00 0 +2020-06-01T00:00:00 0 +2020-07-01T00:00:00 0 +2020-08-01T00:00:00 0 +2020-09-01T00:00:00 0 +2020-10-01T00:00:00 0 +2020-11-01T00:00:00 0 +2020-12-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt index 22205225f7..76b6578d5d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt @@ -1,42 +1,42 @@ -metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- -2019-11-27 None -2019-11-28 None -2019-11-29 None -2019-11-30 None -2019-12-01 1 -2019-12-02 None -2019-12-03 None -2019-12-04 None -2019-12-05 None -2019-12-06 None -2019-12-07 None -2019-12-08 None -2019-12-09 None -2019-12-10 None -2019-12-11 None -2019-12-12 None -2019-12-13 None -2019-12-14 None -2019-12-15 None -2019-12-16 None -2019-12-17 None -2019-12-18 10 -2019-12-19 18 -2019-12-20 2 -2019-12-21 None -2019-12-22 None -2019-12-23 None -2019-12-24 None -2019-12-25 None -2019-12-26 None -2019-12-27 None -2019-12-28 None -2019-12-29 None -2019-12-30 None -2019-12-31 None -2020-01-01 5 -2020-01-02 9 -2020-01-03 1 -2020-01-04 None -2020-01-05 None +metric_time__day bookings_join_to_time_spine +------------------- ----------------------------- +2019-11-27T00:00:00 None +2019-11-28T00:00:00 None +2019-11-29T00:00:00 None +2019-11-30T00:00:00 None +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 None +2019-12-03T00:00:00 None +2019-12-04T00:00:00 None +2019-12-05T00:00:00 None +2019-12-06T00:00:00 None +2019-12-07T00:00:00 None +2019-12-08T00:00:00 None +2019-12-09T00:00:00 None +2019-12-10T00:00:00 None +2019-12-11T00:00:00 None +2019-12-12T00:00:00 None +2019-12-13T00:00:00 None +2019-12-14T00:00:00 None +2019-12-15T00:00:00 None +2019-12-16T00:00:00 None +2019-12-17T00:00:00 None +2019-12-18T00:00:00 10 +2019-12-19T00:00:00 18 +2019-12-20T00:00:00 2 +2019-12-21T00:00:00 None +2019-12-22T00:00:00 None +2019-12-23T00:00:00 None +2019-12-24T00:00:00 None +2019-12-25T00:00:00 None +2019-12-26T00:00:00 None +2019-12-27T00:00:00 None +2019-12-28T00:00:00 None +2019-12-29T00:00:00 None +2019-12-30T00:00:00 None +2019-12-31T00:00:00 None +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 9 +2020-01-03T00:00:00 1 +2020-01-04T00:00:00 None +2020-01-05T00:00:00 None diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt index e3fa7695c5..9985dda031 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -METRIC_TIME__DAY METRIC_TIME__MONTH METRIC_TIME__YEAR BOOKINGS_AT_START_OF_MONTH ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +METRIC_TIME__DAY METRIC_TIME__MONTH METRIC_TIME__YEAR BOOKINGS_AT_START_OF_MONTH +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt index 85dbad0bb9..7cb57b91da 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -METRIC_TIME__DAY BOOKINGS_AT_START_OF_MONTH ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +METRIC_TIME__DAY BOOKINGS_AT_START_OF_MONTH +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt index 2d091b3d6f..4589d9207f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- -2019-12-01 2019-12-01 2019-01-01 1 -2019-12-02 2019-12-01 2019-01-01 1 -2019-12-03 2019-12-01 2019-01-01 1 -2019-12-04 2019-12-01 2019-01-01 1 -2019-12-05 2019-12-01 2019-01-01 1 -2019-12-06 2019-12-01 2019-01-01 1 -2019-12-07 2019-12-01 2019-01-01 1 -2019-12-08 2019-12-01 2019-01-01 1 -2019-12-09 2019-12-01 2019-01-01 1 -2019-12-10 2019-12-01 2019-01-01 1 -2019-12-11 2019-12-01 2019-01-01 1 -2019-12-12 2019-12-01 2019-01-01 1 -2019-12-13 2019-12-01 2019-01-01 1 -2019-12-14 2019-12-01 2019-01-01 1 -2019-12-15 2019-12-01 2019-01-01 1 -2019-12-16 2019-12-01 2019-01-01 1 -2019-12-17 2019-12-01 2019-01-01 1 -2019-12-18 2019-12-01 2019-01-01 1 -2019-12-19 2019-12-01 2019-01-01 1 -2019-12-20 2019-12-01 2019-01-01 1 -2019-12-21 2019-12-01 2019-01-01 1 -2019-12-22 2019-12-01 2019-01-01 1 -2019-12-23 2019-12-01 2019-01-01 1 -2019-12-24 2019-12-01 2019-01-01 1 -2019-12-25 2019-12-01 2019-01-01 1 -2019-12-26 2019-12-01 2019-01-01 1 -2019-12-27 2019-12-01 2019-01-01 1 -2019-12-28 2019-12-01 2019-01-01 1 -2019-12-29 2019-12-01 2019-01-01 1 -2019-12-30 2019-12-01 2019-01-01 1 -2019-12-31 2019-12-01 2019-01-01 1 -2020-01-01 2020-01-01 2020-01-01 5 -2020-01-02 2020-01-01 2020-01-01 5 -2020-01-03 2020-01-01 2020-01-01 5 -2020-01-04 2020-01-01 2020-01-01 5 -2020-01-05 2020-01-01 2020-01-01 5 -2020-01-06 2020-01-01 2020-01-01 5 -2020-01-07 2020-01-01 2020-01-01 5 -2020-01-08 2020-01-01 2020-01-01 5 -2020-01-09 2020-01-01 2020-01-01 5 -2020-01-10 2020-01-01 2020-01-01 5 -2020-01-11 2020-01-01 2020-01-01 5 -2020-01-12 2020-01-01 2020-01-01 5 -2020-01-13 2020-01-01 2020-01-01 5 -2020-01-14 2020-01-01 2020-01-01 5 -2020-01-15 2020-01-01 2020-01-01 5 -2020-01-16 2020-01-01 2020-01-01 5 -2020-01-17 2020-01-01 2020-01-01 5 -2020-01-18 2020-01-01 2020-01-01 5 -2020-01-19 2020-01-01 2020-01-01 5 -2020-01-20 2020-01-01 2020-01-01 5 -2020-01-21 2020-01-01 2020-01-01 5 -2020-01-22 2020-01-01 2020-01-01 5 -2020-01-23 2020-01-01 2020-01-01 5 -2020-01-24 2020-01-01 2020-01-01 5 -2020-01-25 2020-01-01 2020-01-01 5 -2020-01-26 2020-01-01 2020-01-01 5 -2020-01-27 2020-01-01 2020-01-01 5 -2020-01-28 2020-01-01 2020-01-01 5 -2020-01-29 2020-01-01 2020-01-01 5 -2020-01-30 2020-01-01 2020-01-01 5 -2020-01-31 2020-01-01 2020-01-01 5 +metric_time__day metric_time__month metric_time__year bookings_at_start_of_month +------------------- -------------------- ------------------- ---------------------------- +2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-02T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-03T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-04T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-05T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-06T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-07T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-08T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-09T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-10T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-11T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-12T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-13T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-14T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-15T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-16T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-17T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-18T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-19T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-20T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-21T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-22T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-23T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-24T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-25T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-26T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-27T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-28T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-29T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-30T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2019-12-31T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 +2020-01-01T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-02T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-03T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-04T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-05T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-06T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-07T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-08T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-09T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-10T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-11T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-12T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-13T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-14T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-15T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-16T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-17T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-18T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-19T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-20T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-21T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-22T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-23T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-24T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-25T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-26T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-27T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-28T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-29T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-30T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 +2020-01-31T00:00:00 2020-01-01T00:00:00 2020-01-01T00:00:00 5 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt index 9d5ae89a93..09a4c151e2 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,64 +1,64 @@ -metric_time__day bookings_at_start_of_month ------------------- ---------------------------- -2019-12-01 1 -2019-12-02 1 -2019-12-03 1 -2019-12-04 1 -2019-12-05 1 -2019-12-06 1 -2019-12-07 1 -2019-12-08 1 -2019-12-09 1 -2019-12-10 1 -2019-12-11 1 -2019-12-12 1 -2019-12-13 1 -2019-12-14 1 -2019-12-15 1 -2019-12-16 1 -2019-12-17 1 -2019-12-18 1 -2019-12-19 1 -2019-12-20 1 -2019-12-21 1 -2019-12-22 1 -2019-12-23 1 -2019-12-24 1 -2019-12-25 1 -2019-12-26 1 -2019-12-27 1 -2019-12-28 1 -2019-12-29 1 -2019-12-30 1 -2019-12-31 1 -2020-01-01 5 -2020-01-02 5 -2020-01-03 5 -2020-01-04 5 -2020-01-05 5 -2020-01-06 5 -2020-01-07 5 -2020-01-08 5 -2020-01-09 5 -2020-01-10 5 -2020-01-11 5 -2020-01-12 5 -2020-01-13 5 -2020-01-14 5 -2020-01-15 5 -2020-01-16 5 -2020-01-17 5 -2020-01-18 5 -2020-01-19 5 -2020-01-20 5 -2020-01-21 5 -2020-01-22 5 -2020-01-23 5 -2020-01-24 5 -2020-01-25 5 -2020-01-26 5 -2020-01-27 5 -2020-01-28 5 -2020-01-29 5 -2020-01-30 5 -2020-01-31 5 +metric_time__day bookings_at_start_of_month +------------------- ---------------------------- +2019-12-01T00:00:00 1 +2019-12-02T00:00:00 1 +2019-12-03T00:00:00 1 +2019-12-04T00:00:00 1 +2019-12-05T00:00:00 1 +2019-12-06T00:00:00 1 +2019-12-07T00:00:00 1 +2019-12-08T00:00:00 1 +2019-12-09T00:00:00 1 +2019-12-10T00:00:00 1 +2019-12-11T00:00:00 1 +2019-12-12T00:00:00 1 +2019-12-13T00:00:00 1 +2019-12-14T00:00:00 1 +2019-12-15T00:00:00 1 +2019-12-16T00:00:00 1 +2019-12-17T00:00:00 1 +2019-12-18T00:00:00 1 +2019-12-19T00:00:00 1 +2019-12-20T00:00:00 1 +2019-12-21T00:00:00 1 +2019-12-22T00:00:00 1 +2019-12-23T00:00:00 1 +2019-12-24T00:00:00 1 +2019-12-25T00:00:00 1 +2019-12-26T00:00:00 1 +2019-12-27T00:00:00 1 +2019-12-28T00:00:00 1 +2019-12-29T00:00:00 1 +2019-12-30T00:00:00 1 +2019-12-31T00:00:00 1 +2020-01-01T00:00:00 5 +2020-01-02T00:00:00 5 +2020-01-03T00:00:00 5 +2020-01-04T00:00:00 5 +2020-01-05T00:00:00 5 +2020-01-06T00:00:00 5 +2020-01-07T00:00:00 5 +2020-01-08T00:00:00 5 +2020-01-09T00:00:00 5 +2020-01-10T00:00:00 5 +2020-01-11T00:00:00 5 +2020-01-12T00:00:00 5 +2020-01-13T00:00:00 5 +2020-01-14T00:00:00 5 +2020-01-15T00:00:00 5 +2020-01-16T00:00:00 5 +2020-01-17T00:00:00 5 +2020-01-18T00:00:00 5 +2020-01-19T00:00:00 5 +2020-01-20T00:00:00 5 +2020-01-21T00:00:00 5 +2020-01-22T00:00:00 5 +2020-01-23T00:00:00 5 +2020-01-24T00:00:00 5 +2020-01-25T00:00:00 5 +2020-01-26T00:00:00 5 +2020-01-27T00:00:00 5 +2020-01-28T00:00:00 5 +2020-01-29T00:00:00 5 +2020-01-30T00:00:00 5 +2020-01-31T00:00:00 5