v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-04-023429.2 KB
statements

Checks the status of the execution of a statement

Checks the status of the execution of the statement with the specified statement handle. If the statement was executed successfully, the operation returns the requested partition of the result set.

get/api/v2/statements/{statementHandle}

Response

The statement was executed successfully, and the response includes any data requested.

codestring
sqlStatestring
messagestring
statementHandlestring uuid
createdOninteger

Timestamp that specifies when the statement execution started.‌ The timestamp is expressed in milliseconds since the epoch.‌

statementStatusUrlstring uri

Example response

{
  "code": "000123",
  "sqlState": "42601",
  "message": "successfully executed",
  "statementHandle": "536fad38-b564-4dc5-9892-a4543504df6c",
  "createdOn": 1597090533987,
  "resultSetMetaData": {
    "format": "jsonv2",
    "numRows": 100,
    "rowType": [
      {
        "name": "ROWNUM",
        "type": "FIXED",
        "length": 0,
        "precision": 38,
        "scale": 0,
        "nullable": false
      },
      {
        "name": "ACCOUNT_ID",
        "type": "FIXED",
        "length": 0,
        "precision": 38,
        "scale": 0,
        "nullable": false
      },
      {
        "name": "ACCOUNT_NAME",
        "type": "TEXT",
        "length": 1024,
        "precision": 0,
        "scale": 0,
        "nullable": false
      },
      {
        "name": "ADDRESS",
        "type": "TEXT",
        "length": 16777216,
        "precision": 0,
        "scale": 0,
        "nullable": true
      },
      {
        "name": "ZIP",
        "type": "TEXT",
        "length": 100,
        "precision": 0,
        "scale": 0,
        "nullable": true
      },
      {
        "name": "CREATED_ON",
        "type": "TIMESTAMP_NTZ",
        "length": 0,
        "precision": 0,
        "scale": 3,
        "nullable": false
      }
    ],
    "partitionInfo": [
      {
        "rowCount": 1324,
        "compressedSize": 37436824,
        "uncompressedSize": 1343787384
      }
    ],
    "parameters": {
      "binary_output_format": "HEX",
      "date_output_format": "YYYY-MM-DD",
      "time_output_format": "HH24:MI:SS",
      "timestamp_output_format": "YYYY-MM-DD HH24:MI:SS.FF6",
      "timestamp_ltz_output_format": "YYYY-MM-DD HH24:MI:SS.FF6",
      "timestamp_ntz_output_format": "YYYY-MM-DD HH24:MI:SS.FF6",
      "timestamp_tz_output_format": "YYYY-MM-DDTHH24:MI:SS.FF6 TZHTZM",
      "multi_statement_count": 4
    }
  },
  "data": [
    [
      "customer1",
      "1234 A Avenue",
      "98765",
      "2019-08-10 23:56:34.123"
    ],
    [
      "customer2",
      "987 B Street",
      "98765",
      "2019-08-11 09:45:12.890"
    ],
    [
      "customer3",
      "8777 C Blvd",
      "98765",
      "2019-08-12 10:23:51.999"
    ],
    [
      "customer4",
      "64646 D Circle",
      "98765",
      "2019-08-13 01:54:32.000"
    ]
  ],
  "stats": {
    "numRowsInserted": 12,
    "numRowsUpdated": 9,
    "numRowsDeleted": 8,
    "numDuplicateRowsUpdated": 20
  }
}