Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Datasette: a big bag of tricks for solving interesting problems using SQLite


CSV downloaded from from

Commands run during the demo:

sqlite-utils insert manatees.db locations \
    Manatee_Carcass_Recovery_Locations_in_Florida.csv --csv

sqlite-utils schema manatees.db

sqlite-utils manatees.db "select * from locations limit 10"

sqlite-utils transform manatees.db locations \
  --rename LAT latitude \
  --rename LONG_ longitude \
  --type TLENGTH float \
  --drop created_user \
  --drop last_edited_user \
  --drop X \
  --drop Y \
  --drop STATE \
  --drop OBJECTID \
  --pk FIELDID

sqlite-utils convert manatees.db locations \
  REPDATE created_date last_edited_date \

Further reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment