Removing with tomix
--emit tx-rm prints the findings as JSON Lines for
tomix's batch removal, tx rm --from. tx
removes the whole list as one change: it resolves every line before anything changes,
judges the dependency guards against the whole set, and saves and validates once. Preview
first, then save:
$ ripbi scan --emit tx-rm | tx rm --from - ./Model.SemanticModel
$ ripbi scan --emit tx-rm | tx rm --from - ./Model.SemanticModel --save
# ripbi unused objects in Mini.SemanticModel
# Remove them as one change: tx rm --from <this-file> <model> --save
{"type":"column","table":"Sales","name":"Legacy","id":"'Sales'[Legacy]"}
{"type":"measure","table":"Sales","name":"Legacy Total","id":"'Sales'[Legacy Total]"}
| Field | Value |
|---|---|
type | table, column, measure, hierarchy, partition, calculation_item, relationship, role, expression, or function. Always set: it keeps a column and a partition that share a name apart |
table | The owning table, for columns, measures, hierarchies, partitions, and calculation items |
name | The object's name, as written in the model. JSON carries any name, so nothing is quoted |
path | Only for a relationship the model gives no name: its endpoints, 'A'[x] -> 'B'[y], which tx resolves itself |
id | ripbi's display id. tx ignores it but echoes the whole line back as the target's input, so its JSON result traces each removal to its finding |
- What it lists. Exactly the findings the other modes list —
[scan].ignore,--type, and--compare-rootfilter it the same way — plus dead auto date/time tables (verdictdead). An auto date/time table stillin_useorunused_by_reportsis advice, not a removal: switch the setting off in Desktop instead. Report measures and bookmarks live in the report, not the model: they are# skippedcomment lines, whichtxskips. - Encoding. The JSON lines are pure ASCII: every non-ASCII character in a name is a
JSON
\uXXXXescape ("Salg \u00e6\u00f8\u00e5"), whichtxdecodes back to the same name. Windows PowerShell re-encodes text piped between programs with its console code page; ASCII passes through that, and every other shell, unchanged. Comment lines are not escaped —txskips them. - Order. None needed. Lines follow ripbi's identity order; a dead table's members are
listed beside it and
txreports them assubsumed. - Cascades. When the set would also change objects that stay — a relationship to a live
table, a sort-by setting, a perspective entry —
txlists them underWould also change:and refuses until you pass--cascade. - No findings. The list is only comments, and
tx rm --fromexits2(No objects to remove). Gate the pipe on ripbi's exit code (1means there is something to remove). - Rescan after saving. Removing objects can expose new findings — a key column whose only relationship is gone — so run the scan again.
The exit code is unchanged: 1 when there are findings, as in every mode.