Skip to content

Commit c817f11

Browse files
committed
fix(azure-data-explorer): correct the tags ingestion-property example
The example rendered as tags="[''daily'']" — doubled single quotes from an escaping slip, which is not valid Kusto. The reference writes a tags list as tags='["TagA","TagB"]': single outer quotes with the JSON array's own double quotes inside. The clause builder already handled that form; only the example text was wrong. A template literal avoids the escaping entirely, since the metadata generator reads the source verbatim and would otherwise carry the backslashes into the description the model sees. Adds a test asserting the reference's exact multi-property clause round-trips, including the comma inside the quoted array.
1 parent 3d4e3d2 commit c817f11

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

apps/docs/content/docs/en/integrations/azure_data_explorer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ Materialize the result of a KQL query into a table with .set, .append, .set-or-a
349349
| `mode` | string | No | set \(create, fail if it exists\), append \(add to an existing table\), set-or-append \(default\), or set-or-replace \(replace all data\) |
350350
| `sourceQuery` | string | Yes | KQL query whose result becomes the ingested data \(e.g., LogsTable \| where Level == "Error" \| where Timestamp > ago\(1h\)\). Project the columns in the target table\'s order — matching is positional, not by name |
351351
| `async` | boolean | No | Return immediately with an OperationId and keep ingesting in the background. Check progress with Show Operations |
352-
| `ingestionProperties` | string | No | Optional ingestion properties clause contents, e.g. distributed=true, tags=\"\[''daily''\]\" |
352+
| `ingestionProperties` | string | No | Optional ingestion properties clause contents, e.g. distributed=true, tags='\["daily"\]' |
353353

354354
#### Output
355355

apps/sim/tools/azure_data_explorer/ingest_from_query.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ export const azureDataExplorerIngestFromQueryTool: ToolConfig<
8989
type: 'string',
9090
required: false,
9191
visibility: 'user-or-llm',
92-
description:
93-
"Optional ingestion properties clause contents, e.g. distributed=true, tags=\"[''daily'']\"",
92+
description: `Optional ingestion properties clause contents, e.g. distributed=true, tags='["daily"]'`,
9493
},
9594
},
9695
request: {

apps/sim/tools/azure_data_explorer/utils.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ describe('buildWithClause', () => {
7777
)
7878
})
7979

80+
it('accepts the exact multi-property clause the Kusto reference shows', () => {
81+
// .append OldExtents with(tags='["TagA","TagB"]', ingestIfNotExists='["myTag"]')
82+
expect(
83+
buildWithClause(`tags='["TagA","TagB"]', ingestIfNotExists='["myTag"]'`, 'distributed=true')
84+
).toBe(` with (tags='["TagA","TagB"]', ingestIfNotExists='["myTag"]')`)
85+
})
86+
8087
it('rejects a value that would close the clause and extend the command', () => {
8188
expect(() => buildWithClause('format="json") <| evil', 'format="json"')).toThrow(
8289
/Invalid property/

0 commit comments

Comments
 (0)