Comments (3)
It would be really helpful to know whether this is doable and likely to be accepted or not. It has huge bearing on our migration path. @plypaul grateful for your input, thank you.
from dbt-semantic-interfaces.
Hey @adamcunnington-mlg , dunders currently do a lot of heavy lifting in Metricflow name spacing. For example, we will append the requested granularity to time dimensions columns in the result table with dunders (ordered_at__week, etc.), and we use them to denote join paths to dimensions, i.e., order__customer__name
. This is fundamentally how we name columns in the result set.
We're planning features that would allow query time transformation of metrics like period over period and dynamic windows for cumulative metrics. We'd use the dunder syntax here as well to call out the metric transformation in the column name, i.e., revenue__wow
, cumulative_revenue__7d_window
. I do think we're overloading the dunder as it serves a bunch of different purposes, and we've chatted internally about different ways to name columns, but there is no active work going on right now to update this.
All that to say is I don't think we'll be relaxing the dunder restriction on metric names in at least the next 6 months. One option we discussed would be to allow users to specify a replacement for dunders in their project configs.
I get that this is not an ideal timeline given you're trying to migrate today. I'm looking to understand the migration effort for you more clearly to see if there is a path to unblocking you. It seems like there are a few pieces of work:
- Create semantic models and migrate metrics to use the MetricFlow spec - there is some automated tooling [here](https://github.com/dbt-labs/dbt-converter), and happy to collaborate on this if you're getting stuck.
- Update metrics names to remove dunders
- Update references to metric names in downstream tools
It sounds like #3 is the most challenging because metric names are imported directly to Superset then referenced in a ton of downstream dashboards/reports. Is there any way to update these metric definitions via an API? We can help write migration tooling if this is an option.
from dbt-semantic-interfaces.
@Jstein77 thank you for the response. The project config option seems like a really trivial change that would unblock me here. I empathise with the challenge but am glad the overloading of a name is recognised here! Feels far too magical!
The migration effort for us is enormous. We're very aware of dbt-converter and we used that as part of an intensive week where 4 developers sunk a combined 120 hours manually migrating ~1600 metrics to MetricFlow. We finished points 1 and 2 and 3 remains. Preset/Superset does have an API but the metric key is the fundamental ID and can't be changed - we'd have to work with Preset to do a crazy export/import operation to fundamentally change values in their DB - it's super high risk and significant effort.
Could the config be considered as a short term workaround? I could simply use a character other than dunder to drive MetricFlow and all of the work could be avoided :(.
from dbt-semantic-interfaces.
Related Issues (20)
- [Feature] Add config block to saved queries to flag a saved query as enabled/disabled for the declarative cache.
- [Bug] Please support pydantic-2.x HOT 1
- [SL-1489] [Bug] The pydantic shim isn't being included in the `wheel` distributions of the package
- [SL-1491] [CI/CD] Create github action that checks the produced distributions are functional
- [SL-1507] Release 0.5.0a3
- [SL-1508] Release 0.4.3 HOT 1
- [SL-1563] [Feature] Add `meta` to Metric/SemanticModel HOT 2
- [Feature] Add cache config to saved query HOT 3
- [Feature] Add `timezone` key to time dimensions `type_params` HOT 1
- [SL-1603] Remove `create_metric` from protocol spec
- [SL-1610] [SL-1610] [Bug] Referencing entities in where filter causes an error.
- [Python 3.12] Support + test against python 3.12 in dbt-semantic-interfaces
- [Feature] Allow specifying saved query group by items with dundered syntax vs the object syntax HOT 1
- [Bug] Derived metric validation allows empty input metric set
- [Bug] Make `expr` required for derived metrics
- [Feature] Support referencing a metric in where filter HOT 1
- [Feature] Sub-daily granularity
- [Feature] Add `period_agg` field for cumulative metrics
- [Feature] Add `default_grain` to metric spec HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-semantic-interfaces.