Salesforce converter drops OSI metrics during export
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start in converters/salesforce/src/main/java/org/apache/ossie/converter/MetricMappingHandler.java, where the forward path skips metric mapping, and review the README limitation alongside #222 and discussion #28. Done means supported OSI metrics become semanticCalculatedMeasurements with resolved references, while unsupported metrics produce actionable errors and tests verify preservation beyond schema validation.
Written by the indexing model from the issue text.
Description
i reproduced this on main at 1f367e35.
When exporting an OSI model to Salesforce using toSF, the converter generates objects and fields but skips the entire metrics[] section. It exits successfully without producing semanticCalculatedMeasurements.
This affects anyone relying on OSI metric definitions to create Salesforce semantic models, regardless of the source platform.
Example
A model declares a numeric orders.amount field and this metric:
metrics:
- name: total_sales
expression:
dialects:
- dialect: TABLEAU
expression: SUM([orders].[amount])
The numeric field is exported, but total_sales is missing from the output. Using a TABLEAU expression does not resolve the issue.
The forward path in MetricMappingHandler explicitly skips metric mapping. The README documents this limitation, but successful conversion can still leave downstream automation with an incomplete model.
Proposed behavior
- Export supported OSI metrics as
semanticCalculatedMeasurements, preserving names, descriptions, expressions and types. - Resolve expressions against the model’s semantic fields.
- Fail with an actionable error when a metric cannot be converted, rather than silently omitting it.
- Add tests that verify metric preservation and resolved references, beyond JSON-schema validation.
Expression handling should align with the existing work in #222 and discussion #28.
Is anyone already working on this? i’d like to align on the scope before contributing an implementation.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 280
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 32
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/ossie
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100