Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
Created April 11, 2016 06:26
Show Gist options
  • Save tlrobinson/3d71eed6b01c0a902e739af393594a47 to your computer and use it in GitHub Desktop.
Save tlrobinson/3d71eed6b01c0a902e739af393594a47 to your computer and use it in GitHub Desktop.
Import Mint (https://www.mint.com/) data export files into PostgreSQL for analysis in Metabase (http://www.metabase.com/). Will need to change the paths to point to the downloaded and extracted CSVs.
CREATE TABLE transactions (
"date" date,
"description" varchar,
"origin_description" varchar,
"amount" float,
"transaction_type" varchar,
"category_type" varchar,
"category" varchar,
"account_name" varchar,
"labels" varchar,
"notes" varchar
);
COPY transactions (
"date",
"description",
"origin_description",
"amount",
"transaction_type",
"category_type",
"category",
"account_name",
"labels",
"notes"
)
FROM 'transactions.csv'
WITH CSV HEADER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment