Repository navigation
Fixes #37978: MicroStrategy reads a report dataset's lineage from its source cube - #37979
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
| else the dataset itself. Known right after the dataset's SQL was requested; the caller | ||
| keeps it, since the report cache may later evict it. | ||
| """ | ||
| return self._report_cubes.get(dataset_id) or dataset_id |
There was a problem hiding this comment.
Could you also test eviction of both _report_cubes and _source_tables, keeping _cube_sql populated?
There was a problem hiding this comment.
Good catch, thanks! That case did lose the cube. The cube is now saved together with the SQL, so they can't get out of sync. I added a test where both caches are cleared and only the SQL is still cached. Fixed in 2abd985.
The report and parse caches could evict a report while the SQL cache still held it, so the report was matched as a schema cube and lost its column pairs.
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsReading report lineage from its source cube changes catalog lineage for MicroStrategy datasets, so incorrect source identification could misattribute table and column dependencies. Reports built on an Intelligent Cube now inherit the cube's table and column lineage, and warehouse reports and Live cubes get clearer warnings about missing lineage. The cache-eviction issue that could drop column links for reused reports has been addressed. No open issues found. ✅ 1 closed✅ Edge Case: cube_behind reads an LRU cache that can be evicted while the parse is cached
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37978
A dossier dataset can be a report rather than an Intelligent Cube. The SQL view refuses it ("Only cube is supported to get SQL view"), so it had no lineage.
GET /v2/reports/{id}names the cube insource: read-only, no modeling privilege. A report on a Data Import cube is matched on names, as the cube is.Type of change:
Tests:
ingestion/tests/unit/topology/dashboard/test_microstrategy.py: report on a cube, report on a Data Import cube (column pairs), warehouse and prompted reports, unreadable report, Live cube. 110 pass; the new ones fail onmain.main: the cube report gets no lineage, 0 failures.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
MicroStrategy report datasets now inherit lineage from their source Intelligent Cube, while keeping the cube’s identity alongside its cached SQL.
The earlier finding about reused reports losing column links is addressed. No new actionable issues found.
Reviews (4) · Last reviewed commit: "MicroStrategy: cache a report's source c..." · Reviewed by Greptile