Created
October 15, 2012 12:07
-
-
Save jatorre/3892131 to your computer and use it in GitHub Desktop.
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
#in myquery.sql you can have a VEERY BIG SQL file that you need to run on CartoDB, like a huge INSERT or UPDATE | |
curl --data "api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&q=`cat myquery.sql`" https://jatorre.cartodb.com/api/v1/sql |
I am using similar syntax:
curl -d @myquery.sql 'https://xxxxx.cartodb.com/api/v2/sql/?api_key=XXXXXXXXXXXXXXXXXX'
This allows curl to read the file directly, rather than invoking cat.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obviously you need to specify the api_key which you can find on the dashboard of CartoDB->API keys->API KEY
Also on the URL you see jatorre, replace it for your username