Search API - what are the available columns name for select and filter arguments?

Hi,

I am using refinitiv.data.content.search.Definition() which has two argument select and filter.

My question is how can I know which columns name are available for specific views and how can I select all columns. "*" doesn't work.

For example, in screenshot, your example code select columns "ISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate". And I want to know what are other available columns for Views.GOV_CORP_INSTRUMENTS and other views.

Please note it is different with historical_pricing.summaries.Definition() where I have the rics, so i can use data items in desktop to find avaiable columns.

Thank you for the help!


screenshot-2024-02-16-at-155733.png




Best Answer

  • Jirapongse
    Answer ✓

    @liu.chen

    Thank you for reaching out to us.

    You can use the search.metadata.Definition method to get all fields available in each view.

    response = search.metadata.Definition(
        view = search.Views.GOV_CORP_INSTRUMENTS # Required parameter
    ).get_data()


    response.data.df

    The output looks like this:

    1708064246944.png

    For more information, please refero the Building Search into your Application Workflow article. The example is also avialable on GitHub.

Answers

  • Hi @liu.chen ,

    The code below can be used to retrieve the metadata of each view

    import refinitiv.data as rd
    from refinitiv.data.content import search

    rd.open_session()

    response = search.metadata.Definition(
    view = search.Views.GOV_CORP_INSTRUMENTS
    ).get_data()

    response.data.df

    1708064466222.png


  • Thank you very much Jirapongse! This is exactly what I am looking for.