Skip to content
Discussions/App Development/JSON API Query Store documentation out of date, help neededForum ↗

JSON API Query Store documentation out of date, help needed

App Development9 posts272 views2 likesLast activity Sep 2021
GY
gyorgybalazsiOP
Aug 2021

The documentation says:

Note

When you use the Query Store you’ll want your first run to specify createSchema=true so that all the necessary tables are created. After the first run make sure createSchema=false so that it doesn’t attempt to create the tables again.

See: HTTP JSON API Service — Daml SDK 1.16.0 documentation

It turns out that the createSchema=true/false option is deprecated, from the help text:

[main] WARN com.daml.http.JdbcConfig$ - The option 'createSchema' is deprecated. Please use 'start-mode=create-only' for 'createSchema=true' and 'start-mode=start-only' for 'createSchema=false'

Do I need to do the same with these options as is written in the docs for the previous version? Meaning:

At first run, use the ‘start-mode=create-only’ option.
Afterwards use the ‘start-mode=start-only’.

Or do something else?

CO
cocreature
Aug 2021

Yes the same applies to the new options. They are equivalent to the existing ones. Alternatively you can use start-mode=create-if-needed-and-start which will create the schema if it doesn’t exist or is in compatible (e.g. after an sdk upgrade) and start in one go.

GY
gyorgybalazsi
Aug 2021

This last one aeems to be the most convenient, thanks

BA
bartcant
Aug 2021

For my current implementation it appears the start-mode=create-if-needed-and-start did not create the schema. I am on JDK 1.13.1
I still had to start the JSONAPI with createSchema=true first before starting it up with start-mode=create-if-needed-and-start

Only afterwards my websocket failures disappeared in the UX

VI
victor.pr.mueller
Aug 2021

Very weird, I thought my test coverage was working correctly but from what you tell it looks like something went wrong. Thanks for the report, I will take a look and see if I can fix it fast.

(By the one who implemented that feature :joy_cat:)

VI
victor.pr.mueller
Aug 2021

One question though, what SDK version are you using and do you use a specific database backend?

VI
victor.pr.mueller
Sep 2021

I’m still waiting for more input on this topic, because our tests do cover what you report doesn’t work. Could you open an issue here on github with reproduction steps, sdk version, os etc.?

BA
bartcant
Sep 2021

We use Postgresql and SDK 1.13.1

VI
victor.pr.mueller
Sep 2021

I believe that with a newer SDK version the mechanism should work correctly. Could you upgrade to SDK 1.16.0 and try again?

← Back to Discussions