Skip to content

fix(scriptability): export each object once, not once per org the object is published to - #353

Open
dbevacqua-blink wants to merge 1 commit into
thoughtspot:masterfrom
dbevacqua-blink:checkpoint-duplicates-published-objects
Open

fix(scriptability): export each object once, not once per org the object is published to#353
dbevacqua-blink wants to merge 1 commit into
thoughtspot:masterfrom
dbevacqua-blink:checkpoint-duplicates-published-objects

Conversation

@dbevacqua-blink

Copy link
Copy Markdown

checkpoint's ts_metadata_object uses metadata/search results out and emits one row per org id in metadata_header.orgIds. For a published object, this means N duplicates of the object with the same GUID.

TML export is keyed purely by GUID and is org-independent, so emit one row per object. It looks like the logic was copied from the searchable tool, where it's correct; org_id was never read anywhere in scriptability.

…ect is published to

checkpoint's ts_metadata_object uses metadata/search results out and emits
one row per org id in metadata_header.orgIds. For a published object, this
means N duplicates of the object with the same GUID.

TML export is keyed purely by GUID and is org-independent, so emit one
row per object. It looks like the per-org fan-out was copied from the
searchable tool, where it's correct; org_id was never read anywhere in
scriptability.
@dbevacqua-blink
dbevacqua-blink requested a review from a team as a code owner August 12, 2026 11:01
@jp-spotter

jp-spotter commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Great diagnosis, and a well scoped and accurate fix. I have only recently started to maintain cs_tools here, so it is great to learn more about the code base with you. It definitely looks like it was a copy-paste bug.

One ask (not PR blocking), a small regression test asserting one-row-per-object for a multi-org header would guard against this getting re-copied — tests/test_searchable_transformer.py is a reasonable template. Would that be possible? I'll approve if not -- but it doesn't hurt to ask. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants