For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 0

DSS extract raw - gzip

According to the guide, we did 2 steps for extracting using DSS rest api:

Step 1:  url1 - https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRaw 
Step 2: url2 - https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/RawExtractionResults('$JOBID')/$value

$JOBID is obtained in step 1.

In step 2, we set the header:

requestHeaders['Accept-Encoding'] = 'gzip'

When we get the response data from step 2,

resp = requests.get(url2, headers = requestHeaders)

data is sitting in resp.text and could directly save into a csv file.

What's the role of 'gzip' here? We don't see any zipping/compressing.

dss-rest-apidatascope-selectdss
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
13k 32 12 18

Hi @Liang.Xue,

It is advisable to start with a Refinitiv sample and then modify it to your needs.

In most languages, the content decoding is automatically handled by the library - which in this case is the requests module. The actual binary transfer on the wire is gzipped.

If you would like to not have automatic decoding of the binary data (which is a requirement for very large direct data download from AWS), you should set the flag:

req.raw.decode_content = False

See this article on direct AWS downloads.

icon clock
10 |1500

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

Click below to post an Idea Post Idea