Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 18:40
· 13 commits to main since this release
0149587

Added

  • tx rm removes several objects as one change: pass several paths, or --from <file|-> with
    JSON Lines ({"type", "table"?, "name"} or {"path"}) or plain paths. Every kind rm
    supports can be mixed. All targets resolve before anything changes, the dependency guard
    judges the whole set regardless of order, targets inside another target are folded into it,
    and cascades onto surviving objects need --cascade. One validation, one save, one undo step.
    New error codes TOMIX_RM_NEEDS_CASCADE and TOMIX_RM_INPUT_INVALID.
  • tx rm refuses to remove a shared expression that surviving Power Query (M) still reads (M
    partitions, other shared expressions, refresh policy queries), using the bundled M parser.
    JSON adds brokenMReferences; --force overrides.
  • tx validate checks Power Query (M) partition sources and shared expressions offline with
    the bundled M parser, and reports each one that does not parse as an M0001 error with its
    line and column. --no-m (MCP: "m": false) skips the check (#453).
  • tx test --tolerance <value> accepts numeric cells within an absolute difference (0.001) or a
    percentage of the larger value (0.1%), so floating-point noise in averages and ratios no
    longer fails a test. --ignore-row-order sorts both rowsets before comparing, so test queries
    need no ORDER BY. A test overrides either option in a // tx: comment line before its query
    (// tx: tolerance=0.01% ignore-row-order); an unknown directive fails the test.
  • tx test --update-missing records snapshots only for tests that have none yet and compares the
    rest, so adding a test no longer means re-accepting the whole suite. tx test --update now lists
    what it accepted: each rewritten snapshot shows a Before/After table of the cells that changed
    (differences in JSON). Snapshots left behind by a deleted or renamed test are reported as
    orphans (orphans in JSON) without failing the run (#451).
  • A BPA fix expression can assign a quoted string literal as written, with \" and \\
    escapes, so a model-provided rule can set DAX (Expression = "DIVIDE([A], [B])"). An
    unquoted value with ( or [ is still an unsupported fix expression (#208).

Changed

  • tx test snapshots (.expected.json) are written with one column and one row per line, so a
    changed value diffs as its whole row instead of a bare value. Existing snapshots still load;
    the next --update rewrites them in the new layout without changing their content.
  • tx get <object> --output-format tmdl|bim|tmsl prints the object through the model's own
    serializer instead of a hand-built skeleton, so fragments keep descriptions, format strings,
    display folders, lineage tags, annotations and child objects. A TMDL table child is wrapped in
    ref table <name> and pastes into its table's .tmdl file as is. Relationships, roles,
    hierarchies, functions and the other kinds print as fragments instead of the property view,
    and tx get . prints the whole model. A model source without a serializer fails with
    TOMIX_SCRIPT_UNSUPPORTED (#243).
  • The tx bpa run --fix preview groups pending fixes by rule and shows a property change once
    over every object that gets it (IsHidden: false → true over a list of columns, capped at 10
    unless --full), quoting only text values. An expression fix shows full Before/After blocks,
    DAX syntax-highlighted in a terminal and plain when piped, capped at 12 lines each, instead of
    one line cut at 60 characters (#208).
  • A BPA finding is marked fixable (canFix in JSON) only when tx can run its rule's fix
    expression. Under --fix, a rule whose fix tx cannot run (such as
    Partitions[0].Name = it.Name) is listed once with its finding count (unsupportedFixes in
    JSON) instead of adding one "Unsupported fix expression" fix error and one skip per object.
  • tx connect -w checks whether the workspace target already exists by listing the workspace's
    models instead of downloading the target's whole model, so the step after the model picker is
    fast on large models. A dataset that the list hides but that exists (read-only access) is still
    reported instead of being treated as a new mirror (#142).

Fixed

  • A lone [Col] in DAX resolves to the tables DAX can bind it to, instead of the first table
    with a column of that name: the innermost table iterated around it that has the column
    (SUMX('Fact A', [Revenue]) reads 'Fact A'[Revenue], even in a measure of a table with its
    own [Revenue]), and the expression's own table (SUM([Revenue]), a calculated column's row).
    tx rm no longer refuses to remove Sales[Date] because DateTableTemplate's YEAR([Date])
    reads its own Date, and tx deps and rename fixups follow the right columns. Where the
    binding is unknown (a table expression without a rule, EARLIER), every table's column of that
    name still counts, so a removal blocks rather than breaking a reference.
  • BPA follows the same rule: ReferencedBy counts a lone [Col] only for the tables it may bind
    to, so a dead Sales[Date] is no longer kept alive by DateTableTemplate's YEAR([Date]), and
    the DAX_COLUMNS_FULLY_QUALIFIED fix qualifies such a reference with the one table DAX binds it
    to instead of refusing because other tables share the name. It still refuses when two tables
    remain possible.
  • tx validate judges a lone [Col] by the tables DAX can bind it to; it used to pass if any
    table had the column. Outside every iterator, in a measure, calculated column or role filter, a
    column only another table has is a new DAX0010 error (DISTINCTCOUNT([Region]) in a Sales
    measure when only Geo has Region), which DAX rejects too. Inside an iterator that does not
    provide it, it is a DAX0003 warning. Window functions' ORDERBY/PARTITIONBY columns count
    as rows of their relation. Both messages name the qualified columns to use instead.
  • Help for subcommands such as tx stage commit, tx auth login, tx config set and
    tx skills install now shows an Examples: block. The tx auth login service-principal example
    uses -u for the app id instead of --client-id. The reference docs list every shipped option,
    including format --type, save --no-sync and the bpa run staging flags, and no longer show
    -p/-t aliases that tx auth login does not have (#148).

What's Changed

  • feat(get): emit TMDL, BIM and TMSL through the TOM serializer by @bgarcevic in #449
  • feat(validate): report Power Query (M) syntax errors offline by @bgarcevic in #455
  • feat(test): numeric tolerance and order-insensitive comparison by @bgarcevic in #454
  • feat(test): safer snapshot recording with --update-missing, accepted diffs and orphans by @bgarcevic in #456
  • perf(connect): classify the mirror target from the database list by @bgarcevic in #457
  • docs: guard option-level drift and add subcommand help examples by @bgarcevic in #459
  • feat(bpa): grouped --fix preview with highlighted DAX before/after by @bgarcevic in #458
  • feat(rm): batch removal with whole-set guard and Power Query references by @bgarcevic in #460
  • chore(release): prepare 0.12.0 by @github-actions[bot] in #450

Full Changelog: v0.11.0...v0.12.0