Suresh - ELMO - We have few models that contain...
# dev-help
s
We have few models that contains two copies of same table under different aliases and one of the alias contains single quote '. When I am try to add a formula using the column from these table and thoughtspot is throwing "Invalid TML" because the formula_id contained the single quote. This was fixed by escaping with \ and import worked. This was verified by running a search against that formula based column and formula is working expected. Now the problem is - if I view the same model TML in UI or export it, it does not preserve the \ and now if I click a validate button inside TML editor, it throws error which will go away if I add \ again. Since we are trusting on exported model TML to be a valid tml and use it to import it to all 1400 orgs, it fails. I can't modify the alias of table and remove single quote as it is being used by live customers. Can anyone help on this?
a
message has been deleted
s
This looks like a TML serialization/validation bug around model formulas when a table alias contains a single quote. What I can confirm from the docs: - Model TML supports table
alias
values and formula
id
values in the
formulas
section. - ThoughtSpot provides TML import/export/validate APIs specifically for automating deployments, including
VALIDATE_ONLY
on async import. - The docs do not describe any supported escaping rule for a single quote inside a model alias or formula id, and they do not mention export/UI reserialization removing that escape. So I can’t point to a documented workaround that guarantees export will preserve
\'
. So the practical answer is: 1. Do not trust the UI-exported TML as canonical for this model right now. Your own test already shows the exported/UI-rendered TML is rewritten into an invalid form. 2. Use API-based validation in your deployment pipeline before fan-out to 1400 orgs. The async TML import endpoint supports
import_policy: VALIDATE_ONLY
, which is the safest way to gate bad exports before import. 3. Open a ThoughtSpot Support case with a minimal repro. Include: - model with the same table twice under different aliases - one alias containing
'
- formula referencing the quoted alias - imported TML with manual escape - exported/UI-viewed TML where the escape is removed - validation failure after clicking Validate in the TML editor 4. Short-term workaround: keep a patched source TML outside ThoughtSpot and deploy that artifact, rather than round-tripping through UI export. If you need to promote across orgs, validate/import the patched file through the TML APIs instead of re-exporting from the cluster. If you want, I can help you with either: - a support-ready repro package, or - a small script to run
VALIDATE_ONLY
/ import for this TML across orgs. ---
You are interacting with an AI system. Responses should be reviewed.
s
Case created 00445706.