Skip to content

dataset.get_columns

Note

This document has been machine translated.

Get the column definitions of a dataset.

Parameters

  • dataset_label: string -- dataset_name

Return Values

The column information of the dataset is returned as an array. See column_def for details.

Execution example

Request Data

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "dataset.get_columns",
    "params": {
      "dataset_label": "my_dataset"
    }
}

Request Execution

curl -H "Content-type: application/json" \
     -H "APIKey: 9c6f4574-89d1-4e3c-8af7-2549dc217fcf" \
     -H "Secret: aef8caingiej1ieNieJ3Phool4maeGohcies" \
     -X POST -d "@request.json" \
     https://localhost/api/v2/dataset/jsonrpc

Response

{
  "result": [
    {
      "column_name": "id",
      "data_type": "integer",
      "nullable": true,
      "attnum": 1
    },
    {
      "column_name": "name",
      "data_type": "character varying",
      "nullable": true,
      "attnum": 2
    },
    {
      "column_name": "email",
      "data_type": "character varying",
      "nullable": true,
      "attnum": 3
    },
    {
      "column_name": "_transaction_range",
      "data_type": "tstzrange",
      "nullable": false,
      "attnum": 4
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}