In Ruby, ScraperWiki.save_sqlite gets very upset if you try to save a hash of data that includes a column named ‘group’ (raising a syntax error: SQLite3::SQLException)
The python version seems to cope fine with this, presumably quoting all column names.
As the recommended gem is a fork of the original, I’m not entirely sure where to raise issues against it…
The problem needed to be fixed in the upstream
sqlite_magic gem. We’ve developed a fix and opened a pull request:
If you’d like to use this now, add the following line to your
gem "sqlite_magic", github: "openaustralia/sqlite_magic", branch: "quote_column_names"
You can see this in action in this test scraper: https://morph.io/morph-test-scrapers/group_column_name_error
That’s great @henare — thanks!