Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
avatar image
Question by anass.yazane.1 · Dec 24, 2021 at 01:49 PM · rdp

Display fields selected in RDP Search

Hi i have a question regarding the display order for fields selected using RDP Search. why there are not displayed in the order indicated in the select section. Regards

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by raksina.samasiri · Feb 03 at 12:30 PM

Hi @anass.yazane.1
For reference, I'd like to put the solution provided by the Customer support executive regarding the closed case number 10871053 here.

Upon collaborating with our backend teams and Dev, I was able to confirm that the issue lies on the RDP.Search python library function. 

To give more context to this, unlike the underlying RDP Search API, the RDP.Search python library function does not preserve the column order specified in the ‘SELECT’ parameter. 

 It will be considered for a future enhancement, hopefully on the next version.

 For now, the only way to do this would be to manipulate the results to display the columns in the preferred order.  A couple of possible ways to do this are below
  1. Use the selected properties to specify the column names when displaying the dataframe - see changes to original highlighted below. (This works as long as all selected properties appear in the results. May not always be true with very small result sets.)
    import refinitiv.dataplatform as rdp
    import pandas as pd
    import datetime as dt
    Interval_IssueDate=30
    Interval_MatDate=365
    select_properties = "IssuerDescription,Currency,RIC,ISIN,CouponClass,MaturityDate,IssueDate,CouponRate,FaceIssuedTotal,AssetStatusDescription,SeniorityTypeDescription"
    rdp.open_desktop_session(XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
    df_NewIssues=rdp.search(view=rdp.SearchViews.GovCorpInstruments,filter= "MaturityDate gt " + str(dt.date.today()+dt.timedelta(days=Interval_MatDate)) + "  and IssueDate gt " + str(dt.date.today()+dt.timedelta(days=-Interval_IssueDate)) + "  and \
                DbTypeDescription eq 'Corporate' and IssuerTicker eq 'CAFDDC' and IsActive eq true and not(AssetStatus in ('MAT' 'DC'))",
        select = select_properties,
        order_by= "IssueDate,Currency",
        top = 100
    )
    df_NewIssues[select_properties.split(","
  2. Display the response in raw JSON format (as this does preserve the column order). This uses a lower level function rdp.Search.search, see highlighted changes below.
    import refinitiv.dataplatform as rdp
    import pandas as pd
    import datetime as dt
    Interval_IssueDate=30
    Interval_MatDate=365
    rdp.open_desktop_session(XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
    df_NewIssues=rdp.Search.search(view=rdp.SearchViews.GovCorpInstruments,filter= "MaturityDate gt " + str(dt.date.today()+dt.timedelta(days=Interval_MatDate)) + "  and IssueDate gt " + str(dt.date.today()+dt.timedelta(days=-Interval_IssueDate)) + "  and \
                DbTypeDescription eq 'Corporate' and IssuerTicker eq 'CAFDDC' and IsActive eq true and not(AssetStatus in ('MAT' 'DC'))",
        select = "IssuerDescription, Currency, RIC, ISIN, CouponClass, MaturityDate, IssueDate, \
                    CouponRate, FaceIssuedTotal,AssetStatusDescription,SeniorityTypeDescription",
        order_by= "IssueDate,Currency",
        top = 100
    )
    df_NewIssues.data.raw
     
    Response:
     
    {'Total': 5,
    'Hits': [{'IssuerDescription': 'BANQUE FEDERATIVE DU CREDIT MUTUEL SA',
       'Currency': 'EUR',
       'RIC': 'FR0014007PV3=',
       'ISIN': 'FR0014007PV3',
       'CouponClass': 'FIX',
       'MaturityDate': '2027-11-19T00:00:00.000Z',
       'IssueDate': '2022-01-19T00:00:00.000Z',
       'CouponRate': 0.625,
       'FaceIssuedTotal': 750000000,
       'AssetStatusDescription': 'Issued',
       'SeniorityTypeDescription': 'Senior Non-Preferred'},
      {'IssuerDescription': 'BANQUE FEDERATIVE DU CREDIT MUTUEL SA',
       'Currency': 'EUR',
       'RIC': 'FR0014007PW1=',
       'ISIN': 'FR0014007PW1',
       'CouponClass': 'FIX',
       'MaturityDate': '2032-01-19T00:00:00.000Z',
       'IssueDate': '2022-01-19T00:00:00.000Z',
       'CouponRate': 1.125,
       'FaceIssuedTotal': 1250000000,
       'AssetStatusDescription': 'Issued',
       'SeniorityTypeDescription': 'Senior Non-Preferred'},
    etc
    etc
     
    Last line can also be changed to the following, to show only the records, not the total:
    df_NewIssues.data.raw['Hits']
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by raksina.samasiri · Dec 28, 2021 at 11:34 AM

hi @anass.yazane.1

This forum is dedicated to software developers using Refinitiv APIs.

The moderators on this forum do not have deep expertise in every bit of content available through Refinitiv products, which is required to answer content questions such as this one.

The best resource for content questions is the Refinitiv Helpdesk, which can be reached by either calling the Helpdesk number in your country or submitting a new ticket to the support team via MyRefinitiv.

The Helpdesk will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by anass.yazane.1 · Dec 28, 2021 at 11:40 AM
Hi Raskina My request concerns RDP API and specialy RDP Search function. It's the reason i post it in developer communicaty, i don't think HelpDesk will be able to respond such request, which suggest to rise to developer community each time it concerns API. Regards
Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
raksina.samasiri ♦♦ · Dec 28, 2021 at 11:45 AM 0
Share
hi @anass.yazane.1

sorry for this inconvenience, let me try to ask the RDP search expert to help answering this

avatar image
REFINITIV
raksina.samasiri ♦♦ · Jan 20 at 04:34 PM 0
Share

hi @anass.yazane.1

Thank you for your patience, case number 10871053 has been raised and the content specialist should contact you to provide this information soon.

avatar image
REFINITIV
Answer by nick.zincone · Feb 07 at 02:03 PM

Hi @anass.yazane.1

In a past article, we encountered the same issue as you reported. While that article includes some additional functionality to deal with missing columns, it also addresses the order issue.

How we worked through the issue was to place the list of properties in an array:

# Define the collection of properties/fields within our result set
properties = ['IssuerDescription', 'Currency' , 'RIC', 'ISIN', 
              'CouponClass', 'MaturityDate', 'IssueDate', 
              'CouponRate','FaceIssuedTotal', 
              'AssetStatusDescription', 'SeniorityTypeDescription']

When you perform your search, you apply a simple token function when specifying the 'select' statement to present the required comma-delimited string. For example:

maturity=f'{dt.date.today()+dt.timedelta(days=365)}'
issuedate = f'{dt.date.today()+dt.timedelta(days=-30)}'

response = rdp.Search.search(
    view = rdp.SearchViews.GovCorpInstruments,
    filter= f"MaturityDate gt {maturity} and IssueDate gt {issuedate} " + \
            "and DbTypeDescription eq 'Corporate' and " + \
            "IssuerTicker eq 'CAFDDC' and IsActive eq true " + \
            "and not(AssetStatus in ('MAT' 'DC'))",
    select = ','.join(properties)
)
bonds = response.data.df

If you were to display the response as is, you can observe the order issue:

outoforder.png

However, because you placed your field input as an array, you can simply do this:

bonds[properties]

ordered.png


outoforder.png (36.2 KiB)
ordered.png (35.3 KiB)
Comment
haykaz.aramyan

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

Unable to Open RDP Platform Session

Hello i need help

Throttling Limits to RDP API

RDP API monthly usage

Can Refinitiv provide a Java docking document or case on AWS SQS for RDP News API

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges