Created
January 2, 2018 14:19
-
-
Save daniel-sim/e68aac05396f66e17e6e33ce5b9106f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD CSV | |
FROM 'shopify-plug-in-seo-app-history-2018-01-02.csv' | |
HAVING FIELDS | |
( | |
date, event, details, billing_on, shop_name, shop_country, shop_email, shop_domain | |
) | |
INTO postgres:///me?app_history | |
WITH | |
skip header = 1, | |
fields terminated by ',' | |
BEFORE LOAD DO | |
$$ drop table if exists app_history; $$, | |
$$ create table app_history ( | |
date timestamp, | |
event text, | |
details text, | |
billing_on date, | |
shop_name text, | |
shop_country text, | |
shop_email text, | |
shop_domain text | |
); | |
$$; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment