Click here to Skip to main content
14,696,502 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to process the retrieved data and store it in a database of your choice. This should be stored using a high-resolution index appropriate for the data type. 


What I have tried:

import requests
import json

url = "https://ws1.chic.ulster.ac.uk/SensorCentral/REST/SensorDataRangeNanos/flgSh9oHnutzvZVOnnixFNjXIda2zula_101_101?startTs=1594297110372000000&endTs=1594297110372000000"

response = requests.get(url)
data = response.text
parsed = json.loads(data)

print(json.dumps(parsed, indent=1))
Posted
Updated 17-Jul-20 21:32pm

1 solution

Why not use MySQL? You can use the Python mysql.connector library to establish a connection between the database and your program.

Then you can begin executing SQL commands like INSERT to store the data in there.
   
Comments
Member 14891535 18-Jul-20 6:35am
   
Thanks. I have a follow up question regarding mySQL
https://www.codeproject.com/Questions/5274107/Running-SQL-cannot-get-into

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900