Accessing a remote kdb+ server with R

Hi, 
I’m a relatively new kdb+ user but I’ve been using R for a couple of years now.

I’ve successfully been able to compile the qserver solution to interface with a remote kdb+ server and I’m just trying to work through how to connect to it.

The remote kdb+ server gives you the options to connect to their system with the following:

  • hostname

  • port

  • user name

  • password

  • sub_folder

The open_connection function takes into account all of these parameters except for the sub-folder.

The remote kdb+ system I’m trying to connect to is organized with sub_folder and then there are multiple tables inside of each sub_folder.

I have been able to access these using QStudio on my pc but I’d really like to be able to connect via R on my mac.

Is there a way for me to add a “sub_folder” parameter to the open_connection function.

Barring this, is it possible to use some other command to connect to the correct sub_folder and table using the “execute” function.

I’m also wondering if there is a way to query the list of all the sub-folders and tables with R.

thanks in advance for any help.

C

p.s. the interface for R to kdb+ is pretty much the same code that is suppled by the cookbook integrating R to kdb+

       I’m adding it here for reference:

_________________________________________________________________________

dyn.load(“~/Documents/CompiledPrograms/r/osx_qserver/qserver.so”)

open_connection <- function(host=“hostname”, port=XXXX, user=“XXXXXXX”) {

         parameters <- list(host, as.integer(port), user)

      h <- .Call(“kx_r_open_connection”, parameters)

    assign(“.k.h”, h, envir = .GlobalEnv)

    h

}

close_connection <- function(connection) {

.Call(“kx_r_close_connection”, as.integer(connection))

}

execute <- function(connection, query) {

.Call(“kx_r_execute”, as.integer(connection), query)

}

k <- function(query) {

    h <- get(“.k.h”, envir = .GlobalEnv)

    execute(h, query)

}

What do you mean by sub_folder?

And no open_connection just take 3 arguments 

Kim

Sent from my iPhone