Hey everyone, I have questions about
Hey everyone, I have questions about initializing the Thoughtspot SDK.
As far as I understand before embedding Liveboards I have to initialize SDK with
And here is my question:
* Does
init()
creates a global state or I can have multiple init()
instances for different ThoughtSpot Hosts?
For example I have 2 ThoughtSpot Hosts with their own sets of Liveboards, is it possible to somehow configure SDK so I can embed Liveboard from both Hosts at the same page at the same time?11 Replies
I think you should be able to use 2 init for different TS hosts. Each will initialize the corresponding TS host. @jbc to correct me if I am wrong..
Hm, interesting.
So theoretically I can do something like this
Considering that credentials for both hosts is correct.
And that should allow me to embed Liveboards from "Host 1" and "Host 2"?
I think so yes.
Ok, thanks, I'll give it a shot
Hey @Stellnox I confirmed with @jbc (senior FE engineer) internally. Looks like this is not possible. We have a limitation on our side
What is your use case though?
What 2 instances of TS do you have?
That's a bummer, I dont have any specific instance to share. My usecase in that I would like to embed several Liveboards from different TS hosts.
Usually we have just one TS host per customer.. Can you give an example of the different TS hosts?
Well I dont have any specific example unfortunately, its just that edge case when I need to embed liveboard from different hosts.
I see. Will let @jbc comment here once he gets time to give workarounds if possible.
Thank you a lot!
Hey @Stellnox , at the moment we don't have a support for multiple hosts as that wasn't a known requirement so far. You can raise this as a feature request and we could solution this further. cc @Himanshu Arora @Nicolas
The workarounds that can be suggested might be too complicated to implement on your end. You would need a different scope for each usage, so you could save the SDK bundle as separate file within your codebase. eg:
tsembed-1.js
and tsembed-2.js
Or add a NodeJs helper which loads the our SDK with a different name everytime you call it.