Salesforce converter: translate OSI metric expressions and validate field references
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the metric export work in #402 and the expression-language work in #222, then map the stated SQL expression scope to Tableau syntax and reference validation. Add unit and schema coverage for combinations, nulls, duplicates, empty inputs and zero denominators; done means clear metric-named errors for unsupported expressions, missing fields and ambiguous references, with results validated in Tableau Next.
Written by the indexing model from the issue text.
Description
#402 adds metric export but leaves expression translation and field-reference validation for follow-up work. This issue covers that work, including the reference validation requested in #399.
The goal is to convert supported SQL expressions into Tableau formulas so users can reuse their OSI metric definitions without maintaining a separate Tableau expression for each metric.
Initial scope
- Aggregates:
SUM,AVG,MIN,MAX,COUNT(field)andCOUNT(DISTINCT field). - Arithmetic:
+,-,*,/, parentheses and numeric constants. - Conditional logic:
CASE WHEN, comparisons,AND,ORandNOT. - Null handling:
COALESCE,NULLIF,IS NULLandIS NOT NULL. - Numeric functions:
ABS,ROUND,CEILandFLOOR.
Support combinations of these functions, including expressions such as:
SUM(orders.amount * (1 - orders.discount))
SUM(CASE WHEN orders.status = 'paid'
THEN orders.amount ELSE 0 END)
SUM(orders.profit) / NULLIF(SUM(orders.revenue), 0)
Expected behavior
- Translate supported
SNOWFLAKEandANSI_SQLexpressions into Tableau syntax. - Resolve references against declared datasets and fields, including quoted identifiers.
- Validate types and aggregation rules while preserving the original calculation’s meaning.
- Fail with the metric name and a clear explanation for unsupported expressions, missing fields or ambiguous references.
- Test combinations, nulls, empty inputs, duplicates and zero denominators. Validate results in Tableau Next alongside unit and schema tests.
Date/time functions, string functions, casts, references to other metrics, window calculations and level-of-detail calculations can follow as separate milestones. COUNT(*) also needs separate handling to establish which dataset’s rows are being counted.
Source-object discovery, missing-field enrichment and deployment are outside this issue. The extension-preservation fixes identified in #402 should remain there.
i’ll take this on through follow-up PRs built on #402. The implementation should align with the expression-language work in #222.
- 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
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·