DISCREPANCY BETWEEN SEARCH VIA WORKSPACE APPLICATION AND VIA API

s.bariatti
s.bariatti Newcomer
edited February 11 in Workspace SDK

I'm searching for the company tree of some company. these company are subsidiaries and by downloading the tree excel from the workspace application, it is possible to see what level and who they are under. However, if the same thing is done with python starting with the ultimate parent these companies do not come up.

Has this ever happened to you? Do you know why?

below the code for the python research:

rd.get_data(
universe=ids,
fields=['TR.RelatedOrgId', 'TR.RelatedOrgName', 'TR.RelatedOrgType']
)

thank you in advance

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @s.bariatti

    Thank you for reaching out to us.

    I found the answer on this discussion. However, if it doesn't solve the problem, please share the instruments passed to the universe parameter and the output from the Workspace application.

  • Thank you Jirapongse.

    On python I use the same code from the conversation you shared with me. However different results come out than the excel from the workspace application. Below is the instrumenti I use to search with python from which however level 3 (the company Colt CZ) is not extracted. Instead, from the excel file that I download with the workspace application and attach, the company is present. Here the instrumenti passed with python 5085573691

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @s.bariatti

    I ran the code with 5085573691 and it returns null. You may need to contact the helpdesk team directly and ask for the TR.xxx fields that can provide the required data.

    You may try to use the search API in the LSEG Data Library for Python instead. For example:

    ld.discovery.search(
            view = ld.discovery.Views.SEARCH_ALL,
            filter = "UltimateParentCompanyOAPermID eq '5085573691'",
            select = "CommonName,OAPermID,ParentCompanyOAPermID,UltimateParentCompanyOAPermID",
            top = 1000
        )
    
    
    image.png

    The example is on GitHub. You can also refer to the following articles: