question

Upvotes
Accepted
50 1 0 3

Field names and their meta data

Hi,

when using the DIB, i get a bunch of field names available for a particular instrument and its value. i get a similar info when using get_data() whn not defining any field names, which is good and a great step forward.

however, in DIB there is also a neat little description area for the particular field name with a proper Data Item Name and a Definition and so on:


1711439532922.png


now, when using get_data() i only get the raw names which are sometimes very hard to interpret. Like who would have thought that DEF_FC_TP is meant to mean "Consensus Type" or GN_TXT24_1 is supposed to mean "Revised".


so, i wonder if there is either a list or an API method (preferred) to retrieve all field names and their metadata?

this would really help a lot, as i can't even export the DIB info into an xls or similar in order to at least have the Data Item Name.

thanks
Andreas

pythonapi#content
1711439532922.png (169.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @andreas01,

Please note that the answer below was marked as accepted. Please do let us know if that's incorrect.

Upvotes
Accepted
50 1 0 3

@jonathan.legrand yes, i want to download some data via api into my own database and need to know the field info.

i wasnt mentioning that you would provide an xls file, i want to have it an excel file to be able to at least copy and paste fieldnames, descriptions and definitions and dont have to scroll through the DIB and writen them by hand (i cant even copy from DIB).

so, i thought there is an api call i can make, that would make things dynamic as well.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @andreas01 ,

I see. In this case, I believe my colleague's answer might fit.
As you can see, you will have to use the delivery layer of the RD Lib for Python to ping this specific metadata API.
May I suggest also looking into the description output of the get_data function, as shown here?
When it comes to other fields and descriptions, I'm afraid that they're not programatically available, and can only be seen on the DIB.

@jonathan.legrand the metadata API was exactly what i was looking for, thank you!

regarding the get_data, i saw all this but that means to manually go through all fields in the DIB and set them up in my DB. while this works, its a giant PITA and - as you said - only static while the metadata api call gives me any field relevant for this "view".

so, thanks again

hey @jonathan.legrand i experience a bit of a hickup when trying to go through the example for the delivery layer


i have my config json and the following code:

import os
import refinitiv.data as rd

os.environ["RD_LIB_CONFIG_PATH"] = "./Configuration"

rd.get_config()["logs.transports.console.enabled"] = True

rd.open_session("platform.rdp")

url = "http://api.refinitiv.com/data/environmental-social-governance/v2/views/basic"

request_definition = rd.delivery.endpoint_request.Definition(
    url = url,
    method = rd.delivery.endpoint_request.RequestMethod.GET,
    query_parameters = {"universe": "IBM.N"}
)


response = request_definition.get_data()

rd.close_session()

but end up with the following error:

Available scopes: {'trapi.userdata.lists.read' ...<snip out a ton of scopes>..., 'trapi.streaming.pricing.read'}
Missing scopes: {'trapi.data.esg.views-basic.read'} OR {'trapi.demo-access'}

which i refuse to believe that this is true, given i am a what used to be known as Eikon Premium subscriber.

you have any idea whats going on?

Hi @andreas01, I believe that you may not have sufficient scope on Platform Sessions, however, you may have sufficient scope on Desktop Sessions. I am not a licensing expert, and this Forum is not aimed for such questions, however I do believe that Eikon Premium subscriptions do not widen Platform Session scopes. As a result, I would advise either contacting support on my.refinitiv.com or using the Desktop Session, which is detailed here and here; you can create a Desktop Session using `rd.open_session("desktop.workspace")` as opposed to `rd.open_session("platform.rdp")`.

Show more comments
Upvotes
5.8k 21 2 6

Hi @andreas01,

If one wishes to view the fields available for any one instrument, we advise using hte DIB, just as you have.
We cannot generate a static list, in excel or otherwise, of all these items, as the list would be drastically too long. A dynamic, searchable, list was made available as a result, through DIB.

Would you mind expanding on the reason for your request? I'm asking because exporting DIB data onto a list would only limit the dataset to few static items that may go out of date, as opposed to on the DIB...

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.