Connecting to a REST API

transmogrifier
Level 1
Connecting to a REST API
Hi, I am connecting to a rest api with end points in the following form /sensor_1? , where sensor_1 can be one of few hundred different tags. Based on the documentation, I assumed that the best way to connect to this data source is through the http connection where I give the url of each sensor in a different line. It seems as if this method does an append/merge; however, I would like a behavior similar to (unix) paste. Is this possible when specifying multiple urls? relevant info here is that the response is a csv with two columns (timestamp and value).

Best,
C.S.N
0 Kudos
1 Reply
Clรฉment_Stenac
Hi,

The most efficient way to do that would be to write a Python recipe with a few lines of code, that fetches each sensor data (using the Python requests library) and uses pandas (another Python library) to merge by timestamp.

Technically, there is another possibility without code. We would however definitely not recomment it: it would be to create hundreds of HTTP datasets, sync them into hundreds of filesystem datasets (for performance) and use a huge Join recipe.
0 Kudos

Labels

?
Labels (1)
A banner prompting to get Dataiku