Introduction to Client File Store (CFS) - Python

    Zoya Farberov
    Developer Advocate

Introduction

Client File Store houses and makes available content file stores from publisher repositories.  At the time of this writing, the available stores that are in early release:

  • Bulk ESG data: scores and measures in weekly bulk files 
  • The Refinitiv Trade Discovery product supports banks adopting their own market risk models to comply with the Risk Factors Eligibility Test (RFET) under the Fundamental Review of the  Trading Book market risk regulation. It delivers trade observations across multiple asset classes and instruments, both ETI and OTC, that banks can use to assess level of liquidity associated with their risk factors in order to pass the RFET
  • Tick History - Venue By Day

The approach to selecting and downloading the required content is largely common, some filtering options are specific to a particular content set.  In this article we will discuss common tasks and use cases, to enable developers to make this content part of their custom applications.

Client File Store service is part of Refinitiv Data Platform (RDP) family of services.   See section References for the detailed information on RDP.

Permissions are required to access an RDP service, such as CFS, and additional permissions are required to access a specific content set within CFS.  Permissioining is beyond the scope of this article, and is best discussed with one's Refinitiv account team.

Request File Sets Available in the Bucket

Next we define the function requestFileSets that will be out work vehicle  for the next use cases, the same approach is applicable to all CFS, while attributes would differ per CFS as well as per use case.

Paginate Through All the Available FileSets

Paginating through all available file sets is often required.  If attributes are set, the filtering per attributes take place, and narrows down the the File Sets to those that are required for the use case.

If the number of all FileSets in a bucket is (or is expected) to be very large, we would certainly want to further filter by attributes, otherwise this iterative step can take up a significant time.

Request Available Packages

Requesting available packages is another useful way to examine the available content.  We can next use this information to select the packageId or packageId that are required and to request FilSets from the relevant package(s).

Retrieve FileSets of Specific File Type (Filter By Attribute and By PackageId)

When files of several distinct types are available, filtering by file type is a very useful capability.  In the case of ESG content, we filter by ContentType.

The file types that are available may change over time; at the time of this writing, we are going to use as examples:

  • ESG Scores
  • Symbology Cusip

Further, the selected package, if also filtering by packageId has to contain the files per filter in attributes, in order to request their listings successfully,

otherwise the result will be empty.

Note how if we also have the required PackageId available, whether it is learned from reviewing the available information, or recommended by Refinitiv account team, we can further filer FileSets by PackageId

Example - Retrieve Tick History File Sets for a Given Venue In View

Venues (exchanges) and Views (normalized, reference, level 2) are an important means of selection of the required content with CFS- Tick History, therefore, let us consider an example of selecting FileSets for required Venue, of required View (type).

Example - Retrieve Tick History File Sets for a Given Venue Limit By Dates

Another common use case is selecting FileSets for required Venue within specific Dates, often - years, in the example below we select FileSets for years 2007-2009 to download and work with.

Retrieve Complete File Details of FileSet ID

Once we have the FileSet Id of a FileSet that we are interested to examine the files in, we can use it, to retrieve the complete details of a FileSet, by passing it into function requestFileDetails:

Stream File via File Id using Redirect

Note that both FileId and file name are required, to be passed into the next function, so that the file being streamed is stored in a meaningful name that corresponds to the downloaded content.  This information can be pre-selected, by manually pasting from the previous sections output and reading in; for production solutions it should be parsed out from the complete file details, in code.

Stream All Files In FileSet

This is a very popular use case, as the files that are part of a FileSet are united by a common criteria.  From the results of requestFilDetails, we derive the fileId and the file name of every file in FilSet and use requestFileDownload passing them as parameters

Stream File via File Id  - Get File Location (Step 1 of 2)

Next we would like to introduce another way of streaming files:

  1. Get file's location
  2. Download the file directly, using file's location

Stream File via File Id  - Download File From File Location (Step 2 of 2)