does anyone know how to use Date / DateTime Spotfire types as parameters for sdcGetData
in R?
I'm trying to access data in our Spotfire library using the SpotfireData
library availble in TERR. I follow the instructions in the documentation here. I have an information-link I'm trying retrieve data from which has two prompts defined (Product, StartDate). When I run sdcGetInfo
I get the following.
Spotfire data connection info
server: http://OURSPOTFIRESERVER/spotfire
path: /INFOLINKPATH
1 view
Spotfire data connection view: "INFOLINKPATH"
Parameters:
Name DataType Required AllowMultipleValues IsRangeValues
1 StartDate Date TRUE TRUE TRUE
2 Product String TRUE TRUE FALSE
I then try to query data with
df <- sdcGetData(conn, "/INFOLINKPATH", Product = "ABCD", StartDate = c(as.POSIXct("2018-01-01"), as.POSIXct("2018-06-01")))
Which does not work and returns
Error in sdcHttp(conn, url, body = NULL, headers = headers, sendCooki : http err
or: status=500
Now I tried several things with the data including as.Date
, using strings, as.POSIXlt
, adding timezone information. I've also tried not using RANGE
type prompt and instead single value but still get 500 error. If I remove the date as a prompt it works and returns data. Spotfire does not like my dates used as parameters but I cannot figure out why.