@ -449,7 +449,7 @@ If a query of a job fails (and onerror fallbacks for that query and job are defi
#### Templates
Batch Queries provide a simple way to get the error message and the job identifier to be used in your fallbacks, by using the following templates:
Batch Queries provide a simple way to get the error message and the job identifier to be used in your fallbacks defined at the query level, by using the following templates:
- `<%= error_message %>`: will be replaced by the error message raised by the database.
- `<%= job_id %>`: will be replaced by the job identifier that Batch Queries provides.
@ -460,15 +460,13 @@ This is helpful when you want to save error messages into a table:
curl -X POST -H "Content-Type: application/json" -d '{
"query": {
"query": [{
"query": "UPDATE wrong_table SET price = '$100.00' WHERE company = 'CARTO'"
}],
"query": "UPDATE wrong_table SET price = '$100.00' WHERE company = 'CARTO'",
In some scenarios, you may need to fetch the output of a job. If that is the case, wrap the query with `SELECT * INTO`, or `CREATE TABLE AS`. The output is stored in a new table in your database. For example, if using the query `SELECT * FROM airports`: