Connecting to a REST API
transmogrifier
Registered Posts: 1 ✭✭✭✭
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
Best,
C.S.N
Tagged:
Answers
-
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.