@thinkingai/ae-cli 6.0.20 → 6.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/README.zh.md +1 -4
- package/dist/{auth-DYC2BGLM.js → auth-I2G7OAU2.js} +2 -4
- package/dist/{auth-GHBMJ5ZR.js → auth-RDN6D5HU.js} +32 -104
- package/dist/{chunk-5OC7CYCG.js → chunk-2W7HULUD.js} +14 -14
- package/dist/chunk-4EUZRJPO.js +163 -0
- package/dist/{chunk-DMMEPCST.js → chunk-5FBLRSMU.js} +25 -115
- package/dist/{chunk-BJX3GXWC.js → chunk-E34XH4GW.js} +2 -2
- package/dist/chunk-FPE5LGVU.js +105 -0
- package/dist/{chunk-I5CRVM2S.js → chunk-H52CSLJW.js} +44 -17
- package/dist/{chunk-RSHMZ3LG.js → chunk-U6QPKCN3.js} +6 -20
- package/dist/{chunk-6W4QOZAL.js → chunk-WPXHCP4A.js} +23 -13
- package/dist/{chunk-PN3OS34E.js → chunk-XE2PI5DS.js} +1 -1
- package/dist/{chunk-2DUEAXV3.js → chunk-YACCPUNQ.js} +1 -1
- package/dist/cli-token-6AGEDJF4.js +14 -0
- package/dist/{client-2UJ63MVQ.js → client-VTJMUZ4O.js} +3 -3
- package/dist/{config-NCUGK6NS.js → config-2SDTLGOC.js} +3 -3
- package/dist/index.js +309 -197
- package/dist/metadata-JZ2OTWBK.js +420 -0
- package/dist/{model-SJSOZTRS.js → model-ZYMRN4VS.js} +2 -2
- package/dist/{raw-7NVWSVJP.js → raw-NGYHAL3F.js} +4 -4
- package/dist/{sync-GRVO4K3U.js → sync-JVLX6TGW.js} +3 -3
- package/dist/{te-agent-CYZUC4US.js → te-agent-QPZTLHPH.js} +2 -2
- package/dist/{te-analysis-HJ22TUAA.js → te-analysis-WWX3Z6RP.js} +46 -24
- package/dist/{te-audience-MYDE5WEH.js → te-audience-UXGHUVBB.js} +27 -18
- package/dist/{te-common-WNCZB7R7.js → te-common-7XXH73MF.js} +5 -4
- package/dist/{te-community-JEEFXPB3.js → te-community-QKE67HR2.js} +5 -4
- package/dist/{te-dataops-ZTS7XMXM.js → te-dataops-6W7NNYST.js} +4 -5
- package/dist/{te-engage-4XHCTS6I.js → te-engage-NCFAQFX3.js} +5 -4
- package/dist/{te-kb-OWM3RQRH.js → te-kb-K5BQYUCM.js} +4 -5
- package/dist/{te-meta-JVO4QJBH.js → te-meta-LJZBOSMO.js} +26 -19
- package/dist/{te-team-YY24VORI.js → te-team-DHK5R7MV.js} +5 -6
- package/package.json +3 -2
- package/skills/ae-analysis/SKILL.md +9 -2
- package/skills/ae-analysis/references/build_attribution_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_cluster_definition.md +2 -0
- package/skills/ae-analysis/references/build_distribution_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_event_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_funnel_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_interval_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_path_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_prop_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_retention_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_tag_definition.md +2 -0
- package/skills/ae-analysis/references/list_clusters.md +3 -1
- package/skills/ae-analysis/references/list_events.md +5 -2
- package/skills/ae-analysis/references/list_metrics.md +4 -2
- package/skills/ae-analysis/references/list_properties.md +4 -2
- package/skills/ae-analysis/references/list_tags.md +3 -1
- package/skills/ae-generate-tracking-code/SKILL.md +68 -31
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +26 -1
- package/skills/ae-generate-tracking-code/references/te-api.md +47 -164
- package/skills/ae-generate-tracking-plan/SKILL.md +109 -32
- package/skills/ae-generate-tracking-plan/references/te-api.md +57 -27
- package/skills/ae-metadata/SKILL.md +90 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +15 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_write.md +29 -0
- package/skills/ae-metadata/references/metadata_data_table_download.md +17 -0
- package/skills/ae-metadata/references/metadata_data_table_get.md +24 -0
- package/skills/ae-metadata/references/metadata_data_table_list.md +27 -0
- package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +17 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +15 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_write.md +31 -0
- package/skills/ae-metadata/references/metadata_event_get.md +52 -0
- package/skills/ae-metadata/references/metadata_input_file_upload.md +29 -0
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +27 -0
- package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +30 -0
- package/skills/ae-metadata/references/metadata_property_get.md +54 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ae-metadata
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: "AE/TE metadata capability-gateway CLI: metadata event/property detail, metadata data-table management, input-file upload, and property dimension-table binding. Use for ae-cli metadata commands backed by /api/cli/metadata/v1. Must read references before composing commands; command/flags use kebab-case while gateway input keeps snake_case. Never guess project_id, event/property names, input_file_id, or data_table_id."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ae-metadata
|
|
8
|
+
|
|
9
|
+
Capability-gateway domain **`metadata`** — REST via `/api/cli/metadata/v1/...`, auth header **`cli-token`**.
|
|
10
|
+
|
|
11
|
+
Parallel to **`ae-analysis`** (MCP `analysis_meta` for metadata lists/governance). Use **this skill** for gateway-backed metadata detail and data-table/dimension-table operations; use **`ae-analysis`** for MCP metadata list/search, metrics, virtual create, and batch edit.
|
|
12
|
+
|
|
13
|
+
## Global AE CLI Rules
|
|
14
|
+
|
|
15
|
+
| Parameter | Description |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `--format <json\|table>` | Output format. Default JSON. |
|
|
18
|
+
| `--jq <expr>` | jq filter on JSON output. |
|
|
19
|
+
| `--host <url>` | Override active AE host, e.g. `ae-cli metadata event get --host <url> ...`. |
|
|
20
|
+
| `--dry-run` | Validate input against gateway schema without executing. |
|
|
21
|
+
|
|
22
|
+
Output and errors:
|
|
23
|
+
- Success: JSON envelope (default).
|
|
24
|
+
- Failure: `{ "ok": false, "error": { "type", "message", "hint" } }`, non-zero exit.
|
|
25
|
+
|
|
26
|
+
Safety:
|
|
27
|
+
- Read-only commands can run directly after IDs/names are verified.
|
|
28
|
+
- Write commands (`data-table *-write`, `*-delete`, `property-bindings-update`, dimension-table bind/create, `input-file upload`) require `--yes` for non-dry-run execution.
|
|
29
|
+
- **Before any command**, read the matching `references/<name>.md` (filename = command with spaces → underscores, e.g. `metadata event get` → `metadata_event_get.md`).
|
|
30
|
+
- Never invent `project_id`, event/property names, `input_file_id`, or `data_table_id`. Discover names via `ae-analysis` and data table IDs via `metadata data-table list`.
|
|
31
|
+
|
|
32
|
+
## When to Use
|
|
33
|
+
|
|
34
|
+
Switch to **`ae-metadata`** when the user needs:
|
|
35
|
+
|
|
36
|
+
- Full detail for **one** super-event (incl. virtual event `definition`)
|
|
37
|
+
- Full detail for **one** super-property (incl. virtual property `definition`)
|
|
38
|
+
- Metadata data-table list/get/create/update/delete/download
|
|
39
|
+
- Upload a local file to get `input_file_id`
|
|
40
|
+
- Bind an existing data table to a property, or create a CSV dimension table and bind it
|
|
41
|
+
|
|
42
|
+
Stay on **`ae-analysis`** for: metadata event/property/metric list/search, metric CRUD, batch metadata, virtual create, project config, tracking plans.
|
|
43
|
+
|
|
44
|
+
## Command Format
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ae-cli metadata <resource> <action> [options]
|
|
48
|
+
ae-cli metadata property <dimension-table-action> [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- Commands and flags use **kebab-case**: `data-table`, `input-file`, `dimension-table`, `--project-id`, `--data-table-id`.
|
|
52
|
+
- Gateway `input` body fields remain **snake_case** (`project_id`, `event_name`, …); ae-cli maps flags automatically.
|
|
53
|
+
|
|
54
|
+
## PROJECT_ID_GATE
|
|
55
|
+
|
|
56
|
+
Same rules as `ae-analysis`: reuse verified project context in one conversation; otherwise `ae-cli analysis_common +list_projects` (or `ae-analysis` skill) to resolve `project_id`.
|
|
57
|
+
|
|
58
|
+
## Commands (13)
|
|
59
|
+
|
|
60
|
+
| User command | Capability id | Reference |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `metadata event get` | `metadata.event.get` | [metadata_event_get.md](references/metadata_event_get.md) |
|
|
63
|
+
| `metadata property get` | `metadata.property.get` | [metadata_property_get.md](references/metadata_property_get.md) |
|
|
64
|
+
| `metadata input-file upload` | `POST /input-files` | [metadata_input_file_upload.md](references/metadata_input_file_upload.md) |
|
|
65
|
+
| `metadata data-table list` | `metadata.data_table.list` | [metadata_data_table_list.md](references/metadata_data_table_list.md) |
|
|
66
|
+
| `metadata data-table get` | `metadata.data_table.get` | [metadata_data_table_get.md](references/metadata_data_table_get.md) |
|
|
67
|
+
| `metadata data-table csv-write` | `metadata.data_table.csv_write` | [metadata_data_table_csv_write.md](references/metadata_data_table_csv_write.md) |
|
|
68
|
+
| `metadata data-table sql-write` | `metadata.data_table.sql_write` | [metadata_data_table_sql_write.md](references/metadata_data_table_sql_write.md) |
|
|
69
|
+
| `metadata data-table csv-delete` | `metadata.data_table.csv_delete` | [metadata_data_table_csv_delete.md](references/metadata_data_table_csv_delete.md) |
|
|
70
|
+
| `metadata data-table sql-delete` | `metadata.data_table.sql_delete` | [metadata_data_table_sql_delete.md](references/metadata_data_table_sql_delete.md) |
|
|
71
|
+
| `metadata data-table download` | `metadata.data_table.download` | [metadata_data_table_download.md](references/metadata_data_table_download.md) |
|
|
72
|
+
| `metadata data-table property-bindings-update` | `metadata.data_table.property_bindings_update` | [metadata_data_table_property_bindings_update.md](references/metadata_data_table_property_bindings_update.md) |
|
|
73
|
+
| `metadata property bind-existing-dimension-table` | `metadata.property.bind_existing_dimension_table` | [metadata_property_dimension_table_bind_existing.md](references/metadata_property_dimension_table_bind_existing.md) |
|
|
74
|
+
| `metadata property create-and-bind-csv-dimension-table` | `metadata.property.create_and_bind_csv_dimension_table` | [metadata_property_dimension_table_create_and_bind_csv.md](references/metadata_property_dimension_table_create_and_bind_csv.md) |
|
|
75
|
+
|
|
76
|
+
## Quick Verification
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
ae-cli metadata --help
|
|
80
|
+
ae-cli metadata event get --help
|
|
81
|
+
ae-cli metadata property get --help
|
|
82
|
+
ae-cli metadata data-table list --help
|
|
83
|
+
ae-cli metadata event get --project-id 1 --event-name <name> --dry-run
|
|
84
|
+
ae-cli metadata data-table list --project-id 1 --dry-run
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Related Skills
|
|
88
|
+
|
|
89
|
+
- **`ae-analysis`**: `analysis_meta +list_events` / `+list_properties` to discover names before detail get.
|
|
90
|
+
- **Dev workflow**: `.cursor/skills/te-cli-capability-gateway` — inspect gateway schema when adding new metadata capabilities.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# metadata data-table csv-delete
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.csv_delete` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
ae-cli metadata data-table csv-delete --project-id <project_id> --data-table-id <id> --yes
|
|
7
|
+
ae-cli metadata data-table csv-delete --project-id <project_id> --data-table-id <id> --dry-run
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
13
|
+
| `--data-table-id` | Yes | CSV-backed data table ID. |
|
|
14
|
+
|
|
15
|
+
This is a write command. Confirm the table with `metadata data-table get` before deleting.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# metadata data-table csv-write
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.csv_write` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata data-table csv-write --project-id <project_id> --operation create --input-file-id <input_file_id> --data-table-name <name> --columns '<columns_json>' --yes
|
|
9
|
+
ae-cli metadata data-table csv-write --project-id <project_id> --operation incremental_update --data-table-id <id> --input-file-id <input_file_id> --yes
|
|
10
|
+
ae-cli metadata data-table csv-write --project-id <project_id> --operation replace_update --data-table-id <id> --input-file-id <input_file_id> --yes
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Required | Description |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
18
|
+
| `--operation` | Yes | `create`, `incremental_update`, or `replace_update`. |
|
|
19
|
+
| `--input-file-id` | Yes | ID returned by `metadata input-file upload`. |
|
|
20
|
+
| `--data-table-id` | For updates | Existing data table ID. |
|
|
21
|
+
| `--data-table-name` | For create | Technical data table name. |
|
|
22
|
+
| `--display-name` | No | Human-readable table name. |
|
|
23
|
+
| `--description` | No | Table description. |
|
|
24
|
+
| `--columns` | No | Column definitions JSON array. |
|
|
25
|
+
|
|
26
|
+
## Decision Rules
|
|
27
|
+
|
|
28
|
+
- Upload the CSV first with `metadata input-file upload --purpose data_table.csv`.
|
|
29
|
+
- This is a write command; use `--dry-run` before non-dry-run and pass `--yes` when executing.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# metadata data-table download
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.download` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
ae-cli metadata data-table download --project-id <project_id> --data-table-id <id>
|
|
7
|
+
ae-cli metadata data-table download --project-id <project_id> --data-table-id <id> --request-id cli_0123456789abcdef0123456789abcdef --timeout-seconds 120
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
13
|
+
| `--data-table-id` | Yes | Data table ID. |
|
|
14
|
+
| `--request-id` | No | Optional `cli_<32 lowercase hex>` request ID. |
|
|
15
|
+
| `--timeout-seconds` | No | Timeout in seconds, 1 to 7200. |
|
|
16
|
+
|
|
17
|
+
Use this command when the user needs an exported data-table artifact.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# metadata data-table get
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.get` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata data-table get --project-id <project_id> --data-table-id <id>
|
|
9
|
+
ae-cli metadata data-table get --project-id <project_id> --data-table-id <id> --include-preview true
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Required | Description |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
17
|
+
| `--data-table-id` | Yes | Data table ID from `metadata data-table list`. |
|
|
18
|
+
| `--include-preview` | No | Include preview rows when true. |
|
|
19
|
+
|
|
20
|
+
## Request Body
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{ "project_id": 1, "data_table_id": 42, "include_preview": true }
|
|
24
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# metadata data-table list
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.list` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata data-table list --project-id <project_id>
|
|
9
|
+
ae-cli metadata data-table list --project-id <project_id> --dry-run
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Required | Description |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
17
|
+
|
|
18
|
+
## Request Body
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{ "project_id": 1 }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Decision Rules
|
|
25
|
+
|
|
26
|
+
- Use this command to discover `data_table_id` before get, delete, download, or property binding.
|
|
27
|
+
- If the list is empty, do not invent IDs; create/upload a table first or ask for the target table.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# metadata data-table property-bindings-update
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.property_bindings_update` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
ae-cli metadata data-table property-bindings-update --project-id <project_id> --data-table-id <id> --bind-properties '<bind_json>' --yes
|
|
7
|
+
ae-cli metadata data-table property-bindings-update --project-id <project_id> --data-table-id <id> --unbind-properties '<unbind_json>' --yes
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
13
|
+
| `--data-table-id` | Yes | Data table ID. |
|
|
14
|
+
| `--bind-properties` | No | Properties to bind JSON array. Each item includes `property_name` and `property_scope`. |
|
|
15
|
+
| `--unbind-properties` | No | Properties to unbind JSON array. Each item includes `property_name` and `property_scope`. |
|
|
16
|
+
|
|
17
|
+
This is a write command. Use the direct property dimension-table commands when binding a single property is the user-facing goal.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# metadata data-table sql-delete
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.sql_delete` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
ae-cli metadata data-table sql-delete --project-id <project_id> --data-table-id <id> --yes
|
|
7
|
+
ae-cli metadata data-table sql-delete --project-id <project_id> --data-table-id <id> --dry-run
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
13
|
+
| `--data-table-id` | Yes | SQL-backed data table ID. |
|
|
14
|
+
|
|
15
|
+
This is a write command. Confirm the table with `metadata data-table get` before deleting.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# metadata data-table sql-write
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.data_table.sql_write` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata data-table sql-write --project-id <project_id> --operation create --table-name <name> --columns '<columns_json>' --qp '<qp_json>' --strategy overwrite --yes
|
|
9
|
+
ae-cli metadata data-table sql-write --project-id <project_id> --operation update --data-table-id <id> --columns '<columns_json>' --qp '<qp_json>' --yes
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Required | Description |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
17
|
+
| `--operation` | Yes | `create` or `update`. |
|
|
18
|
+
| `--columns` | Yes | Column definitions JSON array. |
|
|
19
|
+
| `--qp` | Yes | SQL data table query plan JSON. |
|
|
20
|
+
| `--data-table-id` | For update | Existing data table ID. |
|
|
21
|
+
| `--table-name` | For create | Technical table name. |
|
|
22
|
+
| `--display-name` | No | Human-readable name. |
|
|
23
|
+
| `--remarks` | No | Table remarks. |
|
|
24
|
+
| `--zone-offset` | No | Time zone offset such as `+08:00`. |
|
|
25
|
+
| `--strategy` | No | `overwrite` or `insert`. |
|
|
26
|
+
| `--update-cron` | No | Scheduled update cron. |
|
|
27
|
+
|
|
28
|
+
## Decision Rules
|
|
29
|
+
|
|
30
|
+
- This is a write command; use `--dry-run` before non-dry-run and pass `--yes` when executing.
|
|
31
|
+
- Keep `columns` and `qp` as valid JSON; do not pass raw SQL unless the server schema requires it inside `qp`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# metadata event get (Super-Event Detail)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md) (`ae-metadata` skill).
|
|
4
|
+
>
|
|
5
|
+
> Capability id: `metadata.event.get` · Domain: `metadata` (capability gateway REST, not MCP `analysis_meta`).
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
|
|
9
|
+
- Fetch **one** super-event metadata record by technical name (full detail, not a paginated list).
|
|
10
|
+
- Inspect virtual event definition (`definition.sources`, filters, relation) when `event_kind=virtual_event`.
|
|
11
|
+
- Read-only; requires metadata **view** permission (`VIEW_META`) in the target project.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ae-cli metadata event get --project-id <project_id> --event-name <event_name>
|
|
17
|
+
ae-cli metadata event get -p <project_id> --event-name <event_name> --dry-run
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
|
|
22
|
+
| Parameter | Required | Description |
|
|
23
|
+
|-----------|----------|-------------|
|
|
24
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
25
|
+
| `--event-name` | Yes | Super-event technical name. Virtual events use the same field. |
|
|
26
|
+
|
|
27
|
+
Gateway request body uses snake_case `input`:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"project_id": 1,
|
|
32
|
+
"event_name": "purchase"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Decision Rules
|
|
37
|
+
|
|
38
|
+
- Prefer **`metadata event get`** over `analysis_meta +list_events` when you need **full detail + virtual definition**, not browsing or fuzzy search.
|
|
39
|
+
- Use `ae-analysis` → `analysis_meta +list_events` first when the event name is unknown or you need keyword search / pagination.
|
|
40
|
+
- If the gateway returns `EVENT_NOT_FOUND`, verify `event_name` spelling and `project_id`; do not invent names.
|
|
41
|
+
- Auth: `cli-token` header (ae-cli injects automatically in sandbox; local CLI uses `getCliToken()`).
|
|
42
|
+
|
|
43
|
+
## Recommended Chaining
|
|
44
|
+
|
|
45
|
+
- `ae-analysis`: `analysis_meta +list_events` (discover name) → `metadata event get` (detail)
|
|
46
|
+
- `metadata event get` → `metadata property get` (inspect properties listed in response)
|
|
47
|
+
|
|
48
|
+
## Next Steps After Failure
|
|
49
|
+
|
|
50
|
+
- Empty or not found: confirm project id and exact `event_name` from `+list_events`.
|
|
51
|
+
- Permission error: confirm metadata view permission in the project.
|
|
52
|
+
- Gateway unavailable: confirm nginx routes `/api/cli/metadata/` and backend capability catalog is deployed.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# metadata input-file upload
|
|
2
|
+
|
|
3
|
+
> Capability endpoint: `POST /api/cli/metadata/v1/input-files` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
- Upload a local CSV file before `metadata data-table csv-write`.
|
|
8
|
+
- Get an `input_file_id` such as `ifile_<32 lowercase hex>`.
|
|
9
|
+
|
|
10
|
+
## Command
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ae-cli metadata input-file upload --project-id <project_id> --purpose data_table.csv --file <local_file> --yes
|
|
14
|
+
ae-cli metadata input-file upload --project-id <project_id> --purpose data_table.csv --file <local_file> --dry-run
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
22
|
+
| `--purpose` | Yes | Input-file purpose. Use `data_table.csv` for data table CSV imports. |
|
|
23
|
+
| `--file` | Yes | Local file path to upload. |
|
|
24
|
+
|
|
25
|
+
## Decision Rules
|
|
26
|
+
|
|
27
|
+
- Run `--dry-run` first to verify the gateway URL and multipart fields.
|
|
28
|
+
- Use the returned `input_file_id` in CSV data-table write or create-and-bind commands.
|
|
29
|
+
- This is a write command; non-dry-run execution requires `--yes`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# metadata property bind-existing-dimension-table
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.property.bind_existing_dimension_table` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata property bind-existing-dimension-table --project-id <project_id> --property-name <name> --property-scope user --data-table-id <id> --yes
|
|
9
|
+
ae-cli metadata property bind-existing-dimension-table --project-id <project_id> --property-name <name> --property-scope event --data-table-id <id> --dict-columns '["display_name"]' --yes
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Required | Description |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
17
|
+
| `--property-name` | Yes | Property technical name. |
|
|
18
|
+
| `--property-scope` | Yes | Property owner table, for example `event` or `user`. |
|
|
19
|
+
| `--data-table-id` | Yes | Existing dimension data table ID. |
|
|
20
|
+
| `--timestamp-join-format` | No | Timestamp join format. |
|
|
21
|
+
| `--dict-columns` | No | Dictionary column names JSON array. |
|
|
22
|
+
|
|
23
|
+
## Decision Rules
|
|
24
|
+
|
|
25
|
+
- Confirm the property with `metadata property get` or `analysis_meta +list_properties`.
|
|
26
|
+
- Confirm the data table with `metadata data-table get`.
|
|
27
|
+
- This is a write command; use `--dry-run` before non-dry-run and pass `--yes` when executing.
|
package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# metadata property create-and-bind-csv-dimension-table
|
|
2
|
+
|
|
3
|
+
> Capability id: `metadata.property.create_and_bind_csv_dimension_table` · Domain: `metadata`.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ae-cli metadata property create-and-bind-csv-dimension-table --project-id <project_id> --property-name <name> --property-scope user --input-file-id <input_file_id> --data-table-name <table_name> --columns '<columns_json>' --yes
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Required | Description |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
16
|
+
| `--property-name` | Yes | Property technical name. |
|
|
17
|
+
| `--property-scope` | Yes | Property owner table, for example `event` or `user`. |
|
|
18
|
+
| `--input-file-id` | Yes | ID returned by `metadata input-file upload`. |
|
|
19
|
+
| `--data-table-name` | No | Technical data table name. |
|
|
20
|
+
| `--display-name` | No | Human-readable table name. |
|
|
21
|
+
| `--description` | No | Table description. |
|
|
22
|
+
| `--columns` | No | Column definitions JSON array. |
|
|
23
|
+
| `--timestamp-join-format` | No | Timestamp join format. |
|
|
24
|
+
| `--dict-columns` | No | Dictionary column names JSON array. |
|
|
25
|
+
|
|
26
|
+
## Decision Rules
|
|
27
|
+
|
|
28
|
+
- Upload the CSV first with `metadata input-file upload --purpose data_table.csv`.
|
|
29
|
+
- Use this one-step command when the user wants a new CSV dimension table bound to a property.
|
|
30
|
+
- This is a write command; use `--dry-run` before non-dry-run and pass `--yes` when executing.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# metadata property get (Super-Property Detail)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md) (`ae-metadata` skill).
|
|
4
|
+
>
|
|
5
|
+
> Capability id: `metadata.property.get` · Domain: `metadata` (capability gateway REST, not MCP `analysis_meta`).
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
|
|
9
|
+
- Fetch **one** super-property metadata record (event scope or user scope).
|
|
10
|
+
- Inspect virtual property definition (`definition.expression`, `dependencies`).
|
|
11
|
+
- Read-only; requires metadata **view** permission in the target project.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ae-cli metadata property get --project-id <project_id> --property-name <name> --property-scope event
|
|
17
|
+
ae-cli metadata property get --project-id <project_id> --property-name <name> --property-scope user --dry-run
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
|
|
22
|
+
| Parameter | Required | Description |
|
|
23
|
+
|-----------|----------|-------------|
|
|
24
|
+
| `--project-id` / `-p` | Yes | Numeric project ID. |
|
|
25
|
+
| `--property-name` | Yes | Super-property technical name. |
|
|
26
|
+
| `--property-scope` | Yes | `event` (super event properties) or `user` (super user properties). |
|
|
27
|
+
|
|
28
|
+
Gateway request body uses snake_case `input`:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"project_id": 1,
|
|
33
|
+
"property_name": "price",
|
|
34
|
+
"property_scope": "event"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Decision Rules
|
|
39
|
+
|
|
40
|
+
- Prefer **`metadata property get`** over `analysis_meta +list_properties` when you need **full detail + virtual definition**, not browsing or fuzzy search.
|
|
41
|
+
- Use `ae-analysis` → `analysis_meta +list_properties` first when the property name is unknown or you need keyword search / pagination.
|
|
42
|
+
- `property_scope` must be exactly `event` or `user` (backend accepts case-insensitive).
|
|
43
|
+
- Virtual / dict / exchange-rate properties are addressed by `property-name` only; do not pass legacy `prop_name`.
|
|
44
|
+
- Event-scoped names like `#account_id` must be passed literally (quote in shell when `#` is present).
|
|
45
|
+
|
|
46
|
+
## Recommended Chaining
|
|
47
|
+
|
|
48
|
+
- `ae-analysis`: `analysis_meta +list_properties` (discover name + scope) → `metadata property get` (detail)
|
|
49
|
+
- `metadata event get` → `metadata property get` (follow properties from event detail)
|
|
50
|
+
|
|
51
|
+
## Next Steps After Failure
|
|
52
|
+
|
|
53
|
+
- Not found: confirm scope (`event` vs `user`) and exact name from `+list_properties`.
|
|
54
|
+
- Permission error: confirm metadata view permission in the project.
|