Skip to content

Instantly share code, notes, and snippets.

@chriswhong
chriswhong / README.md
Created February 28, 2020 17:55
Using ogr2ogr to load a CSV into Postgres

The absolute easiest way to get a CSV into a postgresql table is to use ogr2ogr with AUTODETECT_TYPE=YES.

I learned a while back that this is what cartoDB uses to import your CSV into postgis (with a lot of other parameters added)

ogr2ogr -f PostgreSQL PG:"host=localhost user=postgres dbname=postgres password=password"  docs.csv -oo AUTODETECT_TYPE=YES

Git basics and data structure

Learning Git basics and structure

What is Git?

Git is a Version Control system - a way to manage the changes and progress of a project, so that:

  • We'd know when each change was made, by whom, and why.
  • We'd be able to revert specific changes, even if they were done a while ago.