Closed vplauzon closed 1 year ago
Seems likely this is related to an issue I'm having. I'm trying to use KustoCode.ParseAndAnalyze to validate a bunch of .kql files that we have checked in to our source control in an attempt to catch errors before we try to deploy schema changes to the database.
We have several files that contain commands such as this:
.create-or-alter table ["<table name>"] ingestion json mapping "<mapping name>"
@'['
' {'
' "Column": "Column1",'
' "DataType": "",'
' "Path": "$column1"'
' },'
' {'
' "Column": "Column2",'
' "DataType": "",'
' "Path": "$column2"'
' },'
...
']'
Every time we try ParseAndAnalyze on one of these commands, we are getting Diagnostic errors like this:
Severity: Error Code: KS005 Category: General Message: Expected: workload_group Start: 17 End: 22
and this:
Severity: Error Code: KS006 Category General Message: Missing string Start: 22 End: 22
These parsing errors for commands should be resolved in the most recent 11.3.1 version.
You will also need to use multi-line string literals using ``` as quotes instead of multiple single line string literals which are not supported in command syntax.
Although it is nearly the same command, the 2 commands yield different syntax tree.