Sigma converter silently drops key columns when a relationship's from_columns/to_columns lengths differ

Open Beginner friendly
#405 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start in converters/sigma at OssieToSigmaConverter._build_relationship and reproduce the unequal from_columns/to_columns case from the issue. Check how relationship keys and issues are represented, then ensure the extra key column is not silently lost and that the caller can see the mismatch; rerun the provided conversion example to verify the result.

Written by the indexing model from the issue text.

Description

Summary

OSIToSigmaConverter._build_relationship pairs a relationship's from_columns and to_columns with a bare zip(). The OSI schema only requires each array to have at least one entry independently ($defs/Relationship in core-spec/ossie-schema.json); it does not require them to be the same length. So a compound-key relationship with unequal-length arrays is legal input, and zip() silently stops at the shorter array, dropping the extra key column(s) from the exported Sigma spec with no warning.

Steps to reproduce

from ossie import OssieDataset, OssieDocument, OssieRelationship, OssieSemanticModel
from ossie_sigma.ossie_to_sigma import OssieToSigmaConverter

document = OssieDocument(
    semantic_model=[
        OssieSemanticModel(
            name="m",
            datasets=[
                OssieDataset(name="orders", source="db.public.orders"),
                OssieDataset(name="regions", source="db.public.regions"),
            ],
            relationships=[
                OssieRelationship(
                    name="OrderRegion", **{"from": "orders"}, to="regions",
                    from_columns=["region_id", "sub_id"], to_columns=["region_id"],
                ),
            ],
        )
    ]
)
result = OssieToSigmaConverter().convert(document)
print(result.output["pages"][0]["elements"][0]["relationships"][0]["keys"])
print(result.issues)

keys comes out with a single region_id pair; sub_id is gone and issues is empty, so nothing about the loss is visible to the caller.

Environment

apache/ossie main @ fc6c9df (2026-09-15), converters/sigma.

Dominant language
Python
Stars
2.2k
Forks
280
Avg merge
2d 7h
Merged PRs (30d)
32

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/ossie

All issues in apache/ossie

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.