Comments on: ScraperWiki Datastore – The SQL. https://blog.scraperwiki.com/2011/04/scraperwiki-datastore-the-sql/ Extract tables from PDFs and scrape the web Thu, 14 Jul 2016 16:12:42 +0000 hourly 1 https://wordpress.org/?v=4.6 By: Francis Irving https://blog.scraperwiki.com/2011/04/scraperwiki-datastore-the-sql/#comment-623 Mon, 15 Aug 2011 11:10:50 +0000 http://blog.scraperwiki.com/?p=758214595#comment-623 The example before that shows how to do a basic select from the main swdata table:

scraperwiki.sqlite.attach(“new_americ_foundation_drone_strikes”)
print scraperwiki.sqlite.select(“* from new_americ_foundation_drone_strikes.swdata limit 2”)

There “new_americ_foundation_drone_strikes” is the id in the scraper’s URL. swdata is the name of the default table – you can change that to another table.

There’s an example in the Views tutorial:
http://scraperwiki.com/docs/python/python_view_guide/

]]>
By: Klaus https://blog.scraperwiki.com/2011/04/scraperwiki-datastore-the-sql/#comment-622 Sat, 13 Aug 2011 22:26:02 +0000 http://blog.scraperwiki.com/?p=758214595#comment-622 Is there a document or sample how to get data from another scraper (sqlite table) ? (to transfer data between tables on different scrapers) ?
On the cheat sheet there is a sample

# Get Data and change table name
scraperwiki.sqlite.attach(“new_americ_foundation_drone_strikes”, “src”)
print scraperwiki.sqlite.table_info(“src.swdata”)

but how do I put the scraper/table name from the source table ?

]]>