Metrics CSV Import/Export & DAX Measure Linking
Is your feature request related to a problem? Please describe. The ability to bulk import/export metrics via CSV and link metrics directly to DAX measures for automatic updates.
Describe the solution you'd like Requested Capabilities:
CSV import/export for Metrics - Bulk upload metrics rather than manual creation one-by-one DAX as a measurement type - Native support for DAX (currently can be added as custom measurement type, but native support preferred) Link Metrics to DAX measures - Automatic sync so when a DAX measure changes, the metric definition updates accordingly
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
hey @nikhilchennam @karanh37 @jnrimjhim i would love to work on it could you please assign it to me ? thanks
Hi @jnrimjhim @karanh37 @nikhilchennam I'd love to work on this issue as a part of Open meta data hackathon. Please assign this to me so that i start with my first contribution. Thank you
Assigned it to you @RajdeepKushwaha5 , looking forward for your PR.
Assigned it to you @RajdeepKushwaha5 , looking forward for your PR.
I've opened a pull request to address this issue. Would you mind reviewing it when you have a moment? If everything looks good, could you please add the "safe to test" label? Thank you!
Hi @jnrimjhim @karanh37 @nikhilchennam , I'd like to work on this issue. I've studied the codebase thoroughly and have a clear implementation plan across all three requested capabilities. What I've found in the current codebase:
Metric entity schema (openmetadata-spec/.../entity/data/metric.json) already has metricExpression with a language enum — but DAX is missing. Currently only SQL | Java | JavaScript | Python | External are supported. MetricRepository.java and MetricResource.java exist but neither implements exportToCsv() / importFromCsv() — the Metric entity has no CSV support at all today, despite the framework (EntityCsv, EntityResource.exportCsvInternal/importCsvInternal) being fully in place for other entities. The Power BI connector (ingestion/source/dashboard/powerbi/) already parses DAX expressions from .pbit files — but there's no daxMeasureRef field on the Metric entity to link to them.
What I plan to implement:
- DAX as native expression language:
Add "DAX" to the metricExpressionLanguage enum in metric.json — triggers auto-gen of Java/TypeScript types Update the frontend expression language dropdown in the Metric form component
- daxMeasureRef linkage field:
Add optional daxMeasureRef: EntityReference to metric.json and createMetric.json Override setFields() / clearFields() in MetricRepository.java to handle the new reference field (following the pattern from ChartRepository) Add daxMeasureRef as an entity selector in the Metric creation/edit form (frontend)
- CSV import/export:
Create MetricCsv.java (extends EntityCsv
Note on DAX sync: The "automatic sync" behavior will work through re-running the Power BI ingestion pipeline — the daxMeasureRef field establishes the link so that when Power BI ingestion re-runs, the metric's expression can be refreshed. True real-time push sync would require a separate webhook/event mechanism and is out of scope here; I'll document this clearly. Files touched:
openmetadata-spec/.../entity/data/metric.json openmetadata-spec/.../api/data/createMetric.json openmetadata-service/.../jdbi3/MetricRepository.java openmetadata-service/.../jdbi3/MetricCsv.java (new) openmetadata-service/.../resources/metrics/MetricResource.java openmetadata-ui/.../components/Metric/ (form + list page) openmetadata-ui/.../constants/Metrics.constant.ts
Happy to start immediately. Can you assign this to me?
Import Export is supported in 2.0 release. DAX part is going to be covered in this ticket https://github.com/open-metadata/openmetadata-collate/issues/5988