Skip to main content
Skip table of contents

ProjectValidator (Keboola)

Getting started

This component helps you to automatically validate the project in the CleverMaps platform and ensure that nothing was broken in the data or configuration during the updates. Validation is configured with the set of checks.

Currently you can validate following scenarios:

  • All metrics are computable (real value is returned)

  • Metric value falls into the expected range

  • Column has expected distinct values (e.g. fixed string values which are used further in analysis)

  • Metric is computable on expected dimensions

Configuration

CleverMaps connection

CODE
{
  "project_id": "<YOUR-CLEVERMAPS-PROJECT_ID>",
  "#access_token": "<YOUR-CLEVERMAPS-TOKEN>"
}

All metrics validation

CODE
{
  "project_id": "<YOUR-CLEVERMAPS-PROJECT_ID>",
  "#access_token": "<YOUR-CLEVERMAPS-TOKEN>",
  "validations": {
    "metrics_all": []
  }
}

Expected metric values

CODE
{
  "project_id": "<YOUR-CLEVERMAPS-PROJECT_ID>",
  "#access_token": "<YOUR-CLEVERMAPS-TOKEN>",
  "validations": {
    "metrics_expected": [
      {
        "metric": "<METRIC-NAME>",
        "expected_between": [
          <EXPECTED-MIN>,
          <EXPECTED-MAX>
        ]
      }
    ]
  }
}

Available datasets

CODE
{
  "project_id": "<YOUR-CLEVERMAPS-PROJECT_ID>",
  "#access_token": "<YOUR-CLEVERMAPS-TOKEN>",
  "validations": {
    "available_datasets": [
      {
        "metric_name": "<METRIC-NAME>",
        "expected_datasets": [
          "<EXPECTED-DATASET-1>",
          "<EXPECTED-DATASET-2>"",
          "<EXPECTED-DATASET-3>""
        ]
      }
    ]
  }
}

Distinct column values

CODE
{
  "project_id": "<YOUR-CLEVERMAPS-PROJECT_ID>",
  "#access_token": "<YOUR-CLEVERMAPS-TOKEN>",
  "validations": {
    "property_values": [
      {
        "property_name": "<DATASET-NAME>.<COLUMN-NAME>",
        "expected_values": [
          <EXPECTED-VALUE-1>,
          <EXPECTED-VALUE-2>,
          <EXPECTED-VALUE-3>
        ]
      }
    ]
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.