Created
February 13, 2015 09:36
-
-
Save rastermanden/ac7480390ab3f3703ff8 to your computer and use it in GitHub Desktop.
local-pg-2cartodb
This file contains hidden or 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
COPY | |
(SELECT beliggenhedsadresse_kommune_kode, count(*) as antal | |
FROM cvr.virksomheder | |
WHERE beliggenhedsadresse_kommune_kode <> '' | |
GROUP BY beliggenhedsadresse_kommune_kode | |
ORDER BY antal DESC) | |
TO PROGRAM 'cat <&0 > /tmp/data.csv; curl -F "file=@/tmp/data.csv;filename=cartodbtablename.csv" "https://{CARTODB_USER}.cartodb.com/api/v1/imports/?api_key={APIKEY}"' | |
DELIMITER ',' | |
CSV HEADER; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment