curl --request PUT \
--url https://api-dev.narrative.io/datasets/{dataset_id}/columns-stats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"column_name": "idType",
"approx_count_distinct": 2,
"count_distinct": null,
"histogram": {
"values": {
"adid": {
"absolute": 2,
"ratio": 0.5
},
"idfa": {
"absolute": 2,
"ratio": 0.5
}
},
"number_of_bins": 2
},
"mean": null,
"standard_deviation": null,
"completeness": null,
"observed_types": null
},
{
"column_name": "idValue",
"approx_count_distinct": 20000,
"count_distinct": null,
"histogram": null,
"mean": null,
"standard_deviation": null,
"completeness": null,
"observed_types": null
}
]
}
'{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Create or Update detailed statistics. Detailed statistics are collected for datasets belonging to the Narrative Data Plane, but uploading these stats is necessary for non-Narrative data planes, since Narrative does not have access to the data to compute these statistics.
curl --request PUT \
--url https://api-dev.narrative.io/datasets/{dataset_id}/columns-stats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"column_name": "idType",
"approx_count_distinct": 2,
"count_distinct": null,
"histogram": {
"values": {
"adid": {
"absolute": 2,
"ratio": 0.5
},
"idfa": {
"absolute": 2,
"ratio": 0.5
}
},
"number_of_bins": 2
},
"mean": null,
"standard_deviation": null,
"completeness": null,
"observed_types": null
},
{
"column_name": "idValue",
"approx_count_distinct": 20000,
"count_distinct": null,
"histogram": null,
"mean": null,
"standard_deviation": null,
"completeness": null,
"observed_types": null
}
]
}
'{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}