Here is a simple Python script to store some data in ScraperWiki:
import scraperwiki
scraperwiki.sqlite.save(unique_keys=["a"], data={"a":1, "b":"Foo"})
scraperwiki.sqlite.save(unique_keys=["a"], data={"a":1, "c":"Bar"})
The result is the following table in the datastore:
a b c
1 Bar
This is annoying, since in my second sqlite.save
command, I did not specify "b":""
or any other such thing to blank the contents of the "b" column for row 1. In other words, my desired result is to end up with the following table in the datastore:
a b c
1 Foo Bar
So my question is: when using successive "save" operations to the ScraperWiki datastore, what is the best way to append data without overwriting existing data, in order to achieve the sort of result I have outlined above?