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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 2

How to quote strings in csv files

Hi,
is there a way to obtain a csv file with string fields quoted?
Currently, we receive the csv files without quotes, so it is hard to detect if a field is string or number.

Regards.

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

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

1 Answer

· Write an Answer
Upvotes
Accepted
13.7k 26 8 12

@daniele.sartiano,

there is no parameter to set this, be it in the user preferences or template setup parameters.

How to programmatically identify response data field types ?

If you using scheduled requests you are creating templates, and the response to an API request to create a template contains the data type of every single field you chose. For a string it is:

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldTextFormat"

You can see that here in the DSS REST tutorial 10.

If you are using On Demand requests, you can use a GET call to retrieve the complete list of all available data fields (the entire universe, not limited to those you want). The response contains the data type for every data field. For a string it is:

"FormatType": "Text"

You can see an example for that here in DSS REST tutorial 2 (and other examples in the following REST tutorials).

Using a programmatic approach you could therefore determine the data type for every single data field.

Hope this helps.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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