File size: 1,684 Bytes
2568dca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  "name": "query_lineage",
  "description": "Answer software-factory questions like: What repos belong to a product? What assets are in a version? Structure responses using only valid column names. Output: {columns, filters, metrics, groupby, orderby, row_limit}.",
  "parameters": {
    "type": "object",
    "properties": {
      "columns": { "type": "array", "items": { "type": "string" } },
      "filters": { "type": "array", "items": { "type": "object" } },
      "metrics": { "type": "array", "items": { "type": "object" } },
      "groupby": { "type": "array", "items": { "type": "string" } },
      "orderby": { "type": "array", "items": { "type": "array" } },
      "row_limit": { "type": "integer" }
    },
    "required": ["columns"]
  },
  "valid_columns": [
    "asset_name", "asset_type", "platform_name", "logical_app",
    "logical_app_version", "product_id", "owner", "timestamp",
    "parent_name", "parent_type", "child_id", "external_id",
    "uri", "path", "properties", "teamId"
  ],
  "examples": [
    {
      "input": "Which platforms host the most assets?",
      "output": {
        "columns": ["platform_name"],
        "metrics": [{ "label": "asset_count", "expressionType": "SQL", "sqlExpression": "COUNT(*)" }],
        "groupby": ["platform_name"],
        "orderby": [["asset_count", false]],
        "row_limit": 50
      }
    },
    {
      "input": "What are the repositories in my products?",
      "output": {
        "columns": ["asset_type", "asset_name"],
        "filters": [{ "col": "asset_type", "op": "==", "val": "repo" }],
        "metrics": [],
        "orderby": [["asset_name", true]],
        "row_limit": 30
      }
    }
  ]
}