Capital Markets Adapters 10.15 | Apama Capital Markets Adapters Documentation 10.15 | kdb+ Adapter | Update API call
 
Update API call
KDB+ database can have various customizations especially the tickerplants and trade & quote plants. These plants are set up with various configurations and different api calls could be supported on these plants which are not supported on normal kdb+ databases. Like ".u.upd" call for update/insert statements on normal kdb+ database will throw exception while it will work perfectly well on a tickerplant because ".u.upd" function has to be defined while setting up the tickerplant. On the other side, "upsert" api call on normal kdb+ will perform the update or insert of data in to the table of the kdb+ database while it doesnt work in this way for a tickerplant. Tickerplant has a complex kdb+ system and it has more than one database in it. These databases are in-memory databases and historical databases. So, it could be possible that "upsert" api call request for update/insert will be forwarded only to the historical database by the ticker while it is expected that it should update the in-memory database as well. So, if a customer is using a kdb+ system where ".u.upd" is being defined, it is recommended that ".u.upd" api call has to be used as update api call. If normal kdb+ database is used, "upsert" should be used.
".u.upd" can be defined for the normal database by executing the following command on the q prompt of the database:
.u.upd:upsert
Then .u.upd can also be used as update api call for normal databases but it will behave same as upsert.