Suresh - ELMO - Hi, I am getting "Invalid YAML/...

Hi, I am getting "Invalid YAML/JSON syntax in file." when creating a model with join. I believe there needs to single quote around 'on' key and value of joins attribute.
5 Replies
Suresh - ELMO
Suresh - ELMOOP2mo ago
I took the stringified form JSON created by Symfony App, used Model Importer in UI, there was no validation error. { "model": { "name": "Simple Learning CPD Plan Model (Copied)", "description": "Created By Suresh for testing purpose", "model_tables": [ { "name": "mv_learning_cpd_plan", "fqn": "62ab3964-fc67-4c7e-b42c-a12f9b5ed688", "joins": [ { "with": "mv_hrcore_user", "on": "[mv_learning_cpd_plan::region] = [mv_hrcore_user::region] AND [mv_learning_cpd_plan::user_id] = [mv_hrcore_user::id] AND [mv_learning_cpd_plan::client_name] = [mv_hrcore_user::client_name]", "type": "LEFT_OUTER", "cardinality": "MANY_TO_ONE" } ] }, { "name": "mv_hrcore_user", "fqn": "ad446cb1-ceea-4533-9a7c-813f0812d496" } ] } }
Justin Mathew
Justin Mathew2mo ago
cc: @Swarnika
shikharTS
shikharTS2mo ago
There might be some issue here can you try to follow this : https://developers.thoughtspot.com/docs/tml#yamlReimport
TML
The TML API endpoints allow you to export and import TML files
Suresh - ELMO
Suresh - ELMOOP2mo ago
I am not using REST API playground, instead using API directly within PHP / Symfony setup. Above JSON is from the final string sent in metadata import API.
shikharTS
shikharTS2mo ago
LEt me check and see why this might be throwing an error. Did you escape the double quotes?

Did you find this page helpful?