Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
79fb16e
feat(thoughtspot): package skeleton, CI workflow, and ASF header gate
djwaldo Sep 1, 2026
81fe2b8
fix(thoughtspot): add ASF header to pyproject.toml, pin CI actions to…
djwaldo Sep 1, 2026
430fc52
feat(thoughtspot): vocabulary constants with dialect registration flag
djwaldo Sep 1, 2026
d942a2f
feat(thoughtspot): YAML 1.2 codec so on/off/yes/no survive a round trip
djwaldo Sep 1, 2026
a07a264
test(thoughtspot): pin loader/dumper fixes independently with plain-P…
djwaldo Sep 1, 2026
2c71241
feat(thoughtspot): structured never-silent issue reporting
djwaldo Sep 1, 2026
1bd6963
feat(thoughtspot): custom_extensions stash with staleness-guarded res…
djwaldo Sep 1, 2026
f790a8c
feat(thoughtspot): identifier normalisation with case-folded collisio…
djwaldo Sep 1, 2026
6a62f99
fix(thoughtspot): reject ambiguous column refs; document normalise AS…
djwaldo Sep 1, 2026
3d61b36
feat(thoughtspot): key derivation that refuses to manufacture false keys
djwaldo Sep 1, 2026
ffed80c
fix(thoughtspot): report empty-to_columns relationships, document KD3…
djwaldo Sep 1, 2026
17c3683
docs(thoughtspot): README with direction statement and coverage matrix
djwaldo Sep 1, 2026
9558662
docs(thoughtspot): add identifier-derivation limitations, tighten L2 …
djwaldo Sep 1, 2026
b7b193f
build(thoughtspot): match sibling converters' packaging and CI shape
djwaldo Sep 1, 2026
abe14d8
fix(thoughtspot): correct KD2's upstream-warning claim; harden _yaml …
djwaldo Sep 1, 2026
dd66059
fix(thoughtspot): fold diacritics in normalise(); close a column-ref …
djwaldo Sep 1, 2026
d16a2b7
docs(thoughtspot): future-tense unimplemented claims; name the extern…
djwaldo Sep 1, 2026
5b0e26b
docs(thoughtspot): fix README dev commands for the hatchling/uv packa…
djwaldo Sep 2, 2026
6fad416
fix(thoughtspot): flip DIALECT_IS_REGISTERED now that ossie#351 merged
djwaldo Sep 2, 2026
b8eb552
feat(thoughtspot): expression catalog vocabulary and spec-coverage gate
djwaldo Sep 2, 2026
ee43b07
fix(thoughtspot): reconcile 137 vs 146 with an explicit divergence set
djwaldo Sep 2, 2026
8276df6
fix(thoughtspot): correct Spelling audit, drop dead code, gate empty …
djwaldo Sep 2, 2026
009cb17
feat(thoughtspot): expression emitters for direct, passthrough and un…
djwaldo Sep 2, 2026
f9f5eec
fix(thoughtspot): enforce the E8 wrapper instead of relying on caller…
djwaldo Sep 2, 2026
0a3a335
fix(thoughtspot): make the E8 PARTITION BY guard whitespace-tolerant
djwaldo Sep 2, 2026
915928c
feat(thoughtspot): catalog entries for aggregate functions and type c…
djwaldo Sep 2, 2026
1d2e537
feat(thoughtspot): catalog entries for date/time functions
djwaldo Sep 2, 2026
da96300
feat(thoughtspot): catalog entries for string functions
djwaldo Sep 2, 2026
79859e3
fix(thoughtspot): reject a passthrough template that wraps itself
djwaldo Sep 2, 2026
d1cebb3
feat(thoughtspot): catalog entries for mathematical and conditional f…
djwaldo Sep 2, 2026
afb4a9e
feat(thoughtspot): catalog entries for operators and constructs
djwaldo Sep 2, 2026
88637e7
fix(thoughtspot): escape IN/NOT IN braces; force external dispatch fo…
djwaldo Sep 2, 2026
a6e8856
feat(thoughtspot): catalog entries for window functions
djwaldo Sep 2, 2026
6c0b94b
feat(thoughtspot): reverse-direction inventory (ThoughtSpot -> Ossie)
djwaldo Sep 2, 2026
0e3eaca
fix(ci): trigger thoughtspot CI when the upstream spec file changes
djwaldo Sep 2, 2026
4933c31
fix(thoughtspot): custom_extensions_fragment must be keyed by column,…
djwaldo Sep 2, 2026
f902e6c
fix(thoughtspot): correct the template contract and two catalog defec…
djwaldo Sep 2, 2026
a71284c
docs(thoughtspot): remove citations to a private, deleted workspace f…
djwaldo Sep 2, 2026
9398ab1
fix(thoughtspot): remove remaining internal-process leakage; add pass…
djwaldo Sep 2, 2026
6218bf7
feat(thoughtspot): shallow formula tokenizer for reference rewriting …
djwaldo Sep 2, 2026
963e5d2
fix(thoughtspot): stop quote state leaking into bracket bodies, deleg…
djwaldo Sep 2, 2026
6e728c1
fix(thoughtspot): loosen column-ref table grammar to match its own am…
djwaldo Sep 2, 2026
93f7acc
docs(thoughtspot): drop review-process wording from a test comment
djwaldo Sep 2, 2026
36035f5
feat(thoughtspot): bidirectional datatype map with declared losses named
djwaldo Sep 2, 2026
09b4072
docs(thoughtspot): remove citations to an internal revision id
djwaldo Sep 2, 2026
a2d8c0a
feat(thoughtspot): TML document set with the guid/brace/ordering/YAML…
djwaldo Sep 2, 2026
c463145
fix(thoughtspot): sanitise dump_document_set filenames and strip nest…
djwaldo Sep 2, 2026
82b9923
fix(thoughtspot): reserve minted filenames by their final form, and c…
djwaldo Sep 2, 2026
bee2f97
test(thoughtspot): add a self-policing guard against unresolvable ref…
djwaldo Sep 2, 2026
56393a4
feat(thoughtspot): convert TML columns to Ossie fields with verbatim …
djwaldo Sep 2, 2026
413ed32
fix(thoughtspot): give convert_field a formulas map instead of an inl…
djwaldo Sep 3, 2026
eeed899
fix(thoughtspot): log the genuine silent losses review round 2 found
djwaldo Sep 3, 2026
4ef3947
feat(thoughtspot): convert TML measures to Ossie metrics, composing c…
djwaldo Sep 3, 2026
c690f0b
fix(thoughtspot): stash the source metric shape for round-trip fidelity
djwaldo Sep 3, 2026
d6141b4
fix(thoughtspot): stop silent double aggregation on group_aggregate a…
djwaldo Sep 3, 2026
e417c7d
fix(thoughtspot): only warn when an aggregate is nested, not when it …
djwaldo Sep 3, 2026
25cb518
feat(thoughtspot): complete the TML -> Ossie direction with keys, sta…
djwaldo Sep 3, 2026
16428bf
fix(thoughtspot): stash unconsumed column properties instead of dropp…
djwaldo Sep 3, 2026
b1340b4
fix(thoughtspot): validate relationship targets, centralize the ident…
djwaldo Sep 3, 2026
dc26977
fix(thoughtspot): read SQL View columns from sql_view_columns[], not …
djwaldo Sep 3, 2026
87634b7
feat(thoughtspot): build Table TML documents from Ossie datasets
djwaldo Sep 3, 2026
dd5c9b8
fix(thoughtspot): a bare field's portable expression names the wareho…
djwaldo Sep 3, 2026
539e29a
fix(thoughtspot): read the stashed warehouse column name back, and th…
djwaldo Sep 3, 2026
08e2aa3
refactor(thoughtspot): centralize every custom_extensions[THOUGHTSPOT…
djwaldo Sep 3, 2026
ed22ef8
feat(thoughtspot): build the Model TML document under the R3-R9 impor…
djwaldo Sep 3, 2026
c5545e5
fix(thoughtspot): rewrite formula cross-references to match normalise…
djwaldo Sep 3, 2026
c880f13
fix(thoughtspot): rename FULL_OUTER to OUTER in every emitted join type
djwaldo Sep 3, 2026
4c3ac3b
fix(thoughtspot): drop is_hidden/was_auto_generated from emitted columns
djwaldo Sep 3, 2026
b8e3b9a
feat(thoughtspot): complete the Ossie -> TML direction with joins and…
djwaldo Sep 3, 2026
e45b60d
fix(thoughtspot): a formula cross-reference is not a runtime parameter
djwaldo Sep 3, 2026
0456e7d
fix(thoughtspot): audit and enforce X5's stash-currency rule across e…
djwaldo Sep 3, 2026
53bdef0
fix(thoughtspot): unsurfaced-column membership is a second, orthogona…
djwaldo Sep 3, 2026
fab16ae
test(thoughtspot): TPC-DS and minimal fixture pairs
djwaldo Sep 3, 2026
ccd4081
feat(thoughtspot): CLI entry point for both directions
djwaldo Sep 3, 2026
364839f
test(thoughtspot): round-trip both directions, asserting preservation…
djwaldo Sep 3, 2026
713e133
fix(thoughtspot): restore a referencing join's own name and stop dupl…
djwaldo Sep 3, 2026
7c1b0d4
test(thoughtspot): property-based round-trip over adversarial identif…
djwaldo Sep 3, 2026
a108260
docs(thoughtspot): README, packaging and CI for the bidirectional con…
djwaldo Sep 3, 2026
ae45c99
docs(thoughtspot): generate expression, reverse, datatype and payload…
djwaldo Sep 7, 2026
c43d892
fix(thoughtspot): state the substance of internal rule citations, dro…
djwaldo Sep 7, 2026
6306f8d
fix(thoughtspot): close the last mapping-doc rule-id family (I)
djwaldo Sep 7, 2026
e55809d
fix(thoughtspot): swap ONE_TO_MANY relationship endpoints per spec
djwaldo Sep 7, 2026
30ea7b3
fix(thoughtspot): degrade non-Latin field/metric names instead of dro…
djwaldo Sep 8, 2026
b8deea9
test(thoughtspot): realign the TPC-DS fixture with the reference model
djwaldo Sep 8, 2026
254b4b8
feat(thoughtspot): one semantic model per document, no wrapper
djwaldo Sep 16, 2026
39a3a00
ci(thoughtspot): widen path filters to core-spec/** and examples/**
djwaldo Sep 21, 2026
4ace101
fix(thoughtspot): variadic arity, identifier collisions, case-folded …
djwaldo Sep 23, 2026
7e7309b
fix(thoughtspot): eight defects found by a max-level review of the co…
djwaldo Sep 23, 2026
a05e3b4
fix(thoughtspot): correct the reverse inventory and declare its exemp…
djwaldo Sep 23, 2026
fce4b92
fix(thoughtspot): SQL View merge read the wrong column key; output pa…
djwaldo Sep 23, 2026
4ad211e
fix(thoughtspot): case-folded path guard, the full group_* family, pu…
djwaldo Sep 23, 2026
da98bc9
test(thoughtspot): pin three fixes that no test could fail on
djwaldo Sep 24, 2026
40e1c47
fix(thoughtspot): refuse three unsafe table merges instead of corrupt…
djwaldo Sep 24, 2026
38e4a14
fix(thoughtspot): a formula cross-reference no longer rebinds to anot…
djwaldo Sep 24, 2026
c14ccc0
fix(thoughtspot): relationship names are de-collided, so the document…
djwaldo Sep 24, 2026
daffb8a
fix(thoughtspot): a renamed dataset no longer dangles every reference…
djwaldo Sep 24, 2026
ee32060
fix(thoughtspot): one warehouse column surfaced twice is emitted once
djwaldo Sep 24, 2026
a77daef
fix(thoughtspot): stop inventing display-name collisions that Thought…
djwaldo Sep 24, 2026
b4af823
fix(thoughtspot): build the fiscal gate after the inventory it reads,…
djwaldo Sep 24, 2026
8e93e69
test(thoughtspot): generate document SHAPES, not just names
djwaldo Sep 24, 2026
7391f45
fix(thoughtspot): unique formula ids, and stop erroring on a valid se…
djwaldo Sep 24, 2026
8efe3ab
fix(thoughtspot): preserved formula ids win by reservation, not by lu…
djwaldo Sep 24, 2026
c070832
fix(thoughtspot): emit the compulsory `with` on a referencing join
djwaldo Sep 24, 2026
93b43f7
feat(thoughtspot): preserve obj_id, ThoughtSpot's portable object handle
djwaldo Sep 24, 2026
9892bf1
fix(thoughtspot): a bare group_aggregate keeps its column aggregation
djwaldo Sep 24, 2026
247aaa3
fix(thoughtspot): keep formulas that no column surfaces, and keep the…
djwaldo Sep 24, 2026
dfaf7bc
fix(thoughtspot): stop warning on the two most common correct paths
djwaldo Sep 24, 2026
5df1573
docs(thoughtspot): declare the exemplars a bare keyword hid from the …
djwaldo Sep 24, 2026
fe9b6e6
test(thoughtspot): pin the README's construct counts to the catalog
djwaldo Sep 24, 2026
6479611
fix(thoughtspot): reserve unsurfaced formula ids against minted ones
djwaldo Sep 24, 2026
cc5db0e
test(thoughtspot): close six guards that passed on an empty collection
djwaldo Sep 24, 2026
cde8d79
docs(thoughtspot): explain the placeholder notation the reference doc…
djwaldo Sep 24, 2026
a2a590d
docs(thoughtspot): correct thirteen comments that describe the code w…
djwaldo Sep 24, 2026
ddab0e1
test(thoughtspot): pin the last three loops that an empty collection …
djwaldo Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/converter-thoughtspot-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Converters ThoughtSpot CI
on:
push:
branches: [ "main" ]
paths:
- 'converters/thoughtspot/**'
# core-spec/** is the convention every sibling workflow adopted in #396.
# It is load-bearing here rather than merely conventional: catalog.py's
# spec_construct_names() parses core-spec/expression_language.md directly
# as its upstream-spec coverage oracle, so a spec edit can fail this
# converter's tests without touching a single converter file.
- 'core-spec/**'
- 'examples/**'
- '.github/workflows/converter-thoughtspot-ci.yml'
pull_request:
branches: [ "main" ]
paths:
- 'converters/thoughtspot/**'
- 'core-spec/**'
- 'examples/**'
- '.github/workflows/converter-thoughtspot-ci.yml'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout project
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"

- name: Sync dependencies
working-directory: converters/thoughtspot
run: |
uv sync

- name: Unit Tests
working-directory: converters/thoughtspot
run: |
uv run pytest
1 change: 1 addition & 0 deletions converters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ The Ossie specification currently defines extensions for the following vendors:
| `WISDOM` | WisdomAI domain |
| `NVIDIA_GSF` | NVIDIA Generative Semantic Fabric standalone YAML |
| `SIGMA` | Sigma Computing data model |
| `THOUGHTSPOT` | ThoughtSpot TML (Model + Table/SQL View) |

Each vendor may define custom extensions (via the `custom_extensions` field in the Ossie spec) to carry vendor-specific metadata that does not have an equivalent in the core specification.

Expand Down
25 changes: 25 additions & 0 deletions converters/thoughtspot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

__pycache__/
*.py[cod]
.pytest_cache/
*.egg-info/
dist/
build/
.venv/
venv/
311 changes: 311 additions & 0 deletions converters/thoughtspot/README.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions converters/thoughtspot/docs/datatype-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<!-- GENERATED FILE -- do not edit by hand.
Produced by `tools/generate_reference_docs.py` from:
- `src/ossie_thoughtspot/datatypes.py`
Regenerate with:
uv run --python 3.13 python tools/generate_reference_docs.py
tests/test_reference_docs_current.py fails the suite if this file
drifts from what the generator currently produces. -->

# Ossie <-> ThoughtSpot Datatype Map

The bidirectional Ossie <-> ThoughtSpot TML datatype map. The map is **not injective** — several Ossie types collapse onto one TML spelling and cannot be told apart on the way back; see "Not injective" below.

## The closed Ossie datatype enum

`Boolean`, `Date`, `DateTime`, `DateTimeTz`, `Decimal`, `Float`, `Integer`, `Opaque`, `String`, `Time`

## Ossie -> TML

| Ossie datatype | TML `data_type` (default) | Notes |
|---|---|---|
| `Boolean` | `BOOLEAN` | connection-dependent spelling — `BOOLEAN` by default, `BOOL` when the connection's own TML spells it that way |
| `Date` | `DATE` | exact, single spelling |
| `DateTime` | `DATE_TIME` | exact, single spelling |
| `DateTimeTz` | `DATE_TIME` | ThoughtSpot has no offset-aware column type; the value becomes DATE_TIME and returns as DateTime. |
| `Decimal` | `DOUBLE` | exact, single spelling |
| `Float` | `DOUBLE` | connection-dependent spelling — `DOUBLE` by default, `FLOAT` when the connection's own TML spells it that way; ThoughtSpot has one approximate numeric type, so Float and Decimal both become DOUBLE and return as Decimal. |
| `Integer` | `INT64` | exact, single spelling |
| `Opaque` | `VARCHAR` | Opaque is Ossie's marker for a type outside the portable vocabulary; it becomes VARCHAR and returns as String. |
| `String` | `VARCHAR` | exact, single spelling |
| `Time` | `VARCHAR` | ThoughtSpot has no time-of-day column type; the value becomes VARCHAR. |

A column with no declared `datatype` at all infers `INT64` rather than raising — `datatype` is optional in Ossie, but TML rejects a column with no `db_column_properties` block at all.

## TML -> Ossie

| TML `data_type` | Ossie datatype |
|---|---|
| `BOOL` | `Boolean` |
| `BOOLEAN` | `Boolean` |
| `DATE` | `Date` |
| `DATE_TIME` | `DateTime` |
| `DOUBLE` | `Decimal` |
| `FLOAT` | `Float` |
| `INT64` | `Integer` |
| `VARCHAR` | `String` |

A TML `data_type` outside this map returns no Ossie datatype at all — `datatype` is optional in Ossie, so omitting it is preferred over inventing one.

## Not injective — declared losses

| Ossie datatype | Why the round trip is lossy |
|---|---|
| `DateTimeTz` | ThoughtSpot has no offset-aware column type; the value becomes DATE_TIME and returns as DateTime. |
| `Float` | ThoughtSpot has one approximate numeric type, so Float and Decimal both become DOUBLE and return as Decimal. |
| `Opaque` | Opaque is Ossie's marker for a type outside the portable vocabulary; it becomes VARCHAR and returns as String. |
| `Time` | ThoughtSpot has no time-of-day column type; the value becomes VARCHAR. |

Loading
Loading