Open eeertel opened 1 year ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ilayrn, @orhasban, @zoharHenMicrosoft, @sagivf, @Aviv-Yaniv.
Author: | eeertel |
---|---|
Assignees: | - |
Labels: | `Service Attention`, `question`, `customer-reported`, `Azure Data Explorer` |
Milestone: | - |
Involve Kusto team. It seems a feature request according to service return.
Hi @eeertel and thanks for contacting!
The .show
command verb is excluded from the valid script supported verbs, and the error is correct.
Here is a link to documentation on script resource with supported verbs list:
Kusto Script
Script resource is great to use for data-plane commands.
Commented in the GitHub thread and linked docs. The show command is excluded by design.
Hello @Aviv-Yaniv,
thank you for the response - understood. The problem that we encounter is that we want to use the .show xxx command (as recommended by the Kusto documentation - see the TIP section here) before changing or creating a table. As part of a DevOps pipeline we need to make sure that certain tables and functions exist and would prefer to let the pipeline fail if a table/function already exists with a wrong configuration. Since the .show xxx commands are not supported, we have to fallback on using .NET client libraries from Powershell as described here (a solution which is by far not so elegant). Once we are forced to use .NET client libraries (since not all commands are supported via cmdlets) it does not make much sense to use the native cmdlets in the same script since it would result in a mix-up which would be difficult to maintain. Is there a road map to support all commands via "native" Powershell cmdlets in the future, or would you advise us to keep using .NET client libraries ? Thank you in advance, bye //emil
Hi @eeertel
There is no plan to support show
verb in script, because one cannot reuse it 's results for verification automatically (the command can be used for manual verification).
Here are some advices that hope to be helpful:
If certain table should created by script, and you'd like to make sure it created successfully, please leverage the continueOnErrors
with false value.
One can use create-or-alter
to overcome existing items.
Hello @Aviv-Yaniv,
create-or-alter function(s) are not available for tables (see here).
This means, that there is no way to make sure that the .create table command does what is expected.
Take the following example:
.create table test_table(value: int)
.alter table test_table(xvalue: string)
$result = New-AzKustoScript `
-ClusterName $clusterInfo["ClusterName"] `
-ResourceGroupName $clusterInfo["ClusterResourceGroup"] `
-DatabaseName $KUSTO_AUDIT_DATABASE_NAME `
-Name "_custom_name" `
-SubscriptionId (Get-AzContext).Subscription.Id `
-ScriptContent ".create table test_table(value: int)"
Are you aware of any solution for step 3 to make sure that the table is created in the desired way ?
tnx & bye //emil
Hi @eeertel
The matching for create-or-alter
for tables is alter-merge
Running 3 doesn't intended to remove columns, so it shouldn't fail
I advise to reduce authorizations of tables altering to the minimum required If no guarantee can be made on changes to tables schemas, is favorable to add a monitoring mechanism
Description
When executing the following command:
the response is: [BadRequest] The provided script contains unsupported command. The commands must start with the following verbs: '.create, .create-or-alter, .create-merge, .alter, .alter-merge, .enable'
The documentation does not specify a list of supported/unsupported commands. Please advise which cmdlet can be used to execute other commands (like .show xxx)
Script or Debug output
No response
Environment data
Module versions
Error output