Skip to main content
GET
/
datasets
/
{dataset_id}
/
columns-stats
Get detailed statistics
curl --request GET \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/columns-stats \
  --header 'Authorization: Bearer <token>'
{
  "advanced_statistics_metadata": {
    "snapshot_range": {
      "from_snapshot": null,
      "until_snapshot": null,
      "from_snapshot_timestamp": null,
      "until_snapshot_timestamp": null
    },
    "configuration": {
      "value_histogram": {
        "columns": [
          "firstName",
          "secondName",
          "firstChars",
          "age"
        ]
      },
      "completeness": {
        "columns": [
          "firstName",
          "secondName",
          "firstChars",
          "age"
        ]
      },
      "approx_count_distinct": {
        "columns": [
          "firstChars",
          "age"
        ]
      },
      "count_distinct": {
        "columns": [
          "firstName",
          "secondName"
        ]
      },
      "observed_types_histogram": {
        "columns": [
          "firstName"
        ]
      },
      "mean": {
        "columns": [
          "age"
        ]
      },
      "deviation": {
        "columns": [
          "age"
        ]
      }
    }
  },
  "columns_summary": [
    {
      "name": "age",
      "type": "LONG",
      "basic_statistics": {
        "nan_value_count": null,
        "null_value_count": 0,
        "lower_bound": 22,
        "upper_bound": 52,
        "value_count": 60,
        "column_store_bytes": 655
      },
      "advanced_statistics": {
        "approx_count_distinct": 13,
        "count_distinct": null,
        "histogram": {
          "values": {
            "22": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "25": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "28": {
              "absolute": 9,
              "ratio": 0.2
            },
            "31": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "32": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "34": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "36": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "39": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "40": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "45": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "47": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "50": {
              "absolute": 3,
              "ratio": 0.0667
            },
            "52": {
              "absolute": 3,
              "ratio": 0.0667
            }
          },
          "number_of_bins": 13
        },
        "mean": 35.8,
        "standard_deviation": 9.064215354899726,
        "completeness": 1,
        "observed_types": null
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
integer
required

Unique identifier for a dataset.

Query Parameters

histogram_bin_limit
integer

The maximum number of bins to return for the histograms.

Response

OK

advanced_statistics_metadata
object
Example:
{
"snapshot_range": {
"from_snapshot": null,
"until_snapshot": null,
"from_snapshot_timestamp": null,
"until_snapshot_timestamp": null
},
"configuration": {
"value_histogram": {
"columns": [
"firstName",
"secondName",
"firstChars",
"age"
]
},
"completeness": {
"columns": [
"firstName",
"secondName",
"firstChars",
"age"
]
},
"approx_count_distinct": { "columns": ["firstChars", "age"] },
"count_distinct": { "columns": ["firstName", "secondName"] },
"observed_types_histogram": { "columns": ["firstName"] },
"mean": { "columns": ["age"] },
"deviation": { "columns": ["age"] }
}
}
columns_summary
object[]