Reputation: 414
I have data from a web API that I want to store in a SQL database. Each record in the web API looks like this:
>>> inci[1]
>>> Out[47]:
{'@odata.etag': 'W/"97914784"',
x
Upvotes: 0
Views: 158
Reputation: 89291
That query is invalid. Should be of the form INSERT INTO TableName(Column1, Column2) VALUES (?,?)
, so something like:
cur.execute("""INSERT INTO IncidentBLOB(IncidentBLOB) VALUES (?)""", json.dumps(incident))
Upvotes: 1