Hello Team, I am trying to add NLQ functionality ...
# gooddata-cn
p
Hello Team, I am trying to add NLQ functionality into one of our dashboards; But before that I wanted to test it with the demo data that GoodData has provided. If you look at the steps mentioned below; I was able to do the installation for GD.CN on my localhost, followed by creating workspace and dashboards is fine. But the next step talks about running a python server and generating access token(REACT_APP_DEV_TIGER_API_TOKEN=<token>); can you please guide me to understand how it should be done.
j
Hi Pushkar, from where exactly did you get this "How to run" instructions?
p
j
Quite old demo šŸ˜‰ Definitely I recommend using the latest GD.CN version, not 1.6. Regarding the token - you can use the bootstrap admin token, which is printed after successful start of GD.CN (in terminal) and it is also mentioned in the public DOC:
Copy code
YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz
p
Yes, I tried using the Bootstrap admin taken followed by yarn start(parallelly the GD.CN engine was running) Ex:- YWR............... yarn start Not able to execute the above command
As the above case was not working; then I tried to use the bootstrap admin token in constants.js in workspaceId
According to the second the step mentioned; to run a python server. what does it imply. How can one do that?
j
Hello @Pushkar_Krtrimaiq, @Jacques Sham and I are authors of this demo. This is not an official demo. This is something we put together very quickly during a hackathon, and it worked so we decided to expose this as an example. It was months ago so the demo is now outdated. Typically, you should always use the latest GD.CN like @Jan Soubusta suggests, but given the nature of this demo it is important you use version 1.6 as version 1.7 brought some changes that are not compatible with this demo. The Python server is linked in the README, see the Backend section at https://github.com/gooddata/ui-sdk-examples/tree/master/nlq#backend. I now realize that this repository is not public, so here I exported the source code for you into archive.zip. Just to recap, you need to be running 3 things on your localhost: ā€¢ GoodData.CN CE (with imported layout) ā€¢ the Python server (attached zip) ā€¢ the frontend application (yarn start w/ token) If you have troubles running the GoodData.CN platform or the frontend application I can help. For issues about the Python server I'll let @Jacques Sham comment.
p
Hey, @Jiri Zajic, Firstly, thanks for your reply. I wanted to know that what should I use in place of workspaceID; should it be same as my GD.CN workspaceID? in both frontend and python constants.js file. As you said I should be using GD.CN version 1.6, may I know where can I find it as I need to uninstall new version and reinstall older version. One more Q, How can we check which GD.CN version we are working on currently, as I installed it yesterday itself.
j
@Pushkar_Krtrimaiq the workspace ID should be your GD.CN workspace ID where you imported the linked
gd-cn-layout.json
. You can find all the GoodData.CN CE versions at https://hub.docker.com/r/gooddata/gooddata-cn-ce/tags?page=2. Look for version 1.6, I use the following command to spin up a specific version in my Docker:
Copy code
docker run -i -t -p 3000:3000 -p 5432:5432 --name gooddata-demo-1-6-0 -v gd-volume:/data gooddata/gooddata-cn-ce:1.6.0
You do NOT need to uninstall older versions. Just stop all the other containers and spin up a new one. You can then easily switch between versions by killing container version X and starting container version Y. You got me with the last question šŸ˜„ I don't know! I see that my recently updated Docker now shows the versions ā€” that wasn't there before. Also, I do name my containers with a convention so that they contain the version ā€” not sure if this is the best practice, but it works for me!
j
Be careful about running multiple GD.CN versions on the same laptop with the same
-v gd-volume:/data
! The volume e.g. contains files of PostgreSQL database, which contains all metadata. Different versions of GD.CN can require different database models. Usually, automated migration forward is supported, but definitely backward is not supported! If you want to run multiple GD.CN versions, I recommend to define different volume names or stop using volumes at all.
p
Yeah got it, Thanks a lot @Jiri Zajic and @Jan Soubusta.
j
@Pushkar_Krtrimaiq as Jiri has mentioned, this is hackathon project, please aware the backend may not work as compatible with the latest Python SDK.