I am trying to request data from Bloomberg through Rblpapi::bdp()
.
The query field I want to get contains a list of sponsors (a list of strings) of a specific leveraged loan deal.
fieldInfo("SPNR_LIST")
reveals the type:
fieldInfo("SPNR_LIST")
id mnemonic datatype ftype
SPNR_LIST DX392 SPNR_LIST String BulkFormat
My example:
bdp(securities = "BL0739252 Corp", fields = "SPNR_LIST")
Example's error:
Error in bdp_Impl(con, securities, fields, options, overrides, verbose,: Attempt to access value of element 'SPNR_LIST'(type: 'SPNR_LIST') as 'String' type.
How can I get the whole list of sponsors of a deal?
P.S. with the verbose = T
option bdp
returns:
> bdp(securities = "BL0739252 Corp", fields = "SPNR_LIST", verbose = T)
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "BL0739252 Corp"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
SPNR_LIST[] = {
SPNR_LIST = {
Group Date = 2013-05-28
Sponsor = "Carlyle Group/The"
}
SPNR_LIST = {
Group Date = 2013-02-04
Sponsor = "Carlyle Group/The"
}
}
}
}
}
}
Error in bdp_Impl(con, securities, fields, options, overrides, verbose,: Attempt to access value of element 'SPNR_LIST'(type: 'SPNR_LIST') as 'String' type.
Thanks for any help on this. I hope that I described my issue clearly enough.
Using bds does the trick:
bds(security = "BL0739252 Corp", field = "SPNR_LIST")
@assylias solved my issue, thanks again mate.