Query Result SchemaΒΆ

 1{
 2  "$schema": "http://json-schema.org/draft-07/schema#",
 3  "$id": "https://gitlab.com/datadrivendiscovery/datamart-api/query_result_schema.json",
 4  "title": "Result",
 5  "definitions": {
 6    "augmentation_unit": {
 7      "type": "array",
 8      "description": "An array of column identifiers that represents an unit for the augmentation. In the simplest case, we have a single identifier, and in more complex cases, we have multiple identifiers (e.g.: columns 'latitude' and 'longitude' could be combined to join and/or concatenate with column 'country')."
 9    }
10  },
11  "type": "object",
12  "properties": {
13    "id": {
14      "type": "string",
15      "description": "The dataset identifier provided by DataMart."
16    },
17    "score": {
18      "type": "number",
19      "description": "A non-negative number that represents the relevance of this dataset to query. Larger scores indicate better matches. Scores across different DataMart systems are not comparable."
20    },
21    "metadata": {
22      "type": "object",
23      "description": "The metadata associated with the dataset. Metadata from different DataMart systems can have different schemas.",
24      "properties": {
25        "name": {
26          "type": "string"
27        },
28        "description": {
29          "type": "string"
30        }
31      },
32      "required": ["name"]
33    },
34    "sample": {
35      "type": "string",
36      "description": "An optional sample of the dataset, in CSV format"
37    },
38    "augmentation": {
39      "type": "object",
40      "description": "The augmentation suggested by the DataMart system.",
41      "properties": {
42        "type": {
43          "type": "string",
44          "enum": [
45            "join",
46            "union",
47            "none"
48          ]
49        },
50        "left_columns": {
51          "type": "array",
52          "description": "The left-side columns for the augmentation, which correspond to the supplied dataset.",
53          "items": {
54            "$ref": "#/definitions/augmentation_unit"
55          }
56        },
57        "right_columns": {
58          "type": "array",
59          "description": "The right-side columns for the augmentation, which correspond to the DataMart dataset.",
60          "items": {
61            "$ref": "#/definitions/augmentation_unit"
62          }
63        }
64      }
65    }
66  },
67  "required": ["id", "score", "metadata"]
68}