Commit c9c54c8
authored
Add dunder prefix to column aliases for simple-metric inputs (#1938)
To avoid alias conflicts in the generated SQL when a semantic model has
a dimension and a simple metric with the same name, this PR updates the
naming scheme for SQL column aliases. The longer term fix is to add a
validation so that semantic models are required to have unique metric /
measure / entity names.
Due to the large snapshot changes, please view by commit.1 parent cac02cd commit c9c54c8
File tree
2,523 files changed
+81584
-81259
lines changed- .changes/unreleased
- metricflow-semantics/metricflow_semantics
- specs
- test_helpers/semantic_manifest_yamls/name_edge_case_manifest
- semantic_models
- tests_metricflow
- fixtures
- query_rendering
- snapshots
- test_cli.py/str
- test_cli_quiet.py/str
- test_cm_branch_combiner.py/DataflowPlan
- test_common_dataflow_branches.py/str
- test_conversion_metric_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_conversion_metrics_to_sql.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_convert_semantic_model.py/SqlPlan/DuckDB
- test_cte_sql.py/str
- test_cumulative_metric_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_custom_granularity.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_cyclic_join.py/DataflowPlan
- test_data_warehouse_tasks.py/str
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_dataflow_plan_builder.py/DataflowPlan
- test_dataflow_to_execution.py/ExecutionPlan/DuckDB
- test_dataflow_to_sql_plan.py
- DataflowPlan
- SqlPlan
- DuckDB
- test_derived_metric_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_distinct_values_to_sql.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_explain.py/str
- test_fill_nulls_with_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_granularity_date_part_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_metric_filter_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_metric_time_dimension_to_sql.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_metric_time_without_metrics.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_name_edge_caes.py/SqlPlan/DuckDB
- test_predicate_pushdown_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_query_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_rendered_query.py/str
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
- test_source_scan_optimizer.py/DataflowPlan
- test_time_spine_join_rendering.py/SqlPlan
- BigQuery
- Databricks
- DuckDB
- Postgres
- Redshift
- Snowflake
- Trino
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
2,523 files changed
+81584
-81259
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| |||
383 | 391 | | |
384 | 392 | | |
385 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments