New-AzSynapseKqlScript
Creates or updates a KQL script in a workspace.
Syntax
SetByName (Default)
New-AzSynapseKqlScript
-WorkspaceName <String>
-DefinitionFile <String>
[-Name <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByNameAndKustoPoolDatabase
New-AzSynapseKqlScript
-WorkspaceName <String>
-KustoPoolName <String>
-KustoPoolDatabaseName <String>
-DefinitionFile <String>
[-Name <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByObject
New-AzSynapseKqlScript
-WorkspaceObject <PSSynapseWorkspace>
-DefinitionFile <String>
[-Name <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByObjectAndKustoPoolDatabase
New-AzSynapseKqlScript
-WorkspaceObject <PSSynapseWorkspace>
-KustoPoolName <String>
-KustoPoolDatabaseName <String>
-DefinitionFile <String>
[-Name <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzSynapseKqlScript cmdlet creates or updates a KQL script in a workspace.
Examples
Example 1
New-AzSynapseKqlScript -WorkspaceName ContosoWorkspace -DefinitionFile "C:\samples\KqlScript.kql"
This command creates or updates a KQL script from Kusto query file KqlScript.kql in the workspace named ContosoWorkspace.
Example 2
$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | New-AzSynapseKqlScript -DefinitionFile "C:\samples\KqlScript.kql"
This command creates or updates a KQL script from Kusto query file KqlScript.kql in the workspace named ContosoWorkspace through pipeline.
Example 3
New-AzSynapseKqlScript -WorkspaceName ContosoWorkspace -DefinitionFile "C:\samples\KqlScript.kql" -KustoPoolName ContosoKustoPool -KustoPoolDatabaseName ContosoKustoPoolDatabase
This command creates or updates a KqlScript from Kusto query file KqlScript.kql which attaches to ContosoKustoPoolDatabase in the workspace named ContosoWorkspace.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefinitionFile
The KQL file path.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: File
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KustoPoolDatabaseName
Name of Synapse Kusto database.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByNameAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByObjectAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KustoPoolName
Name of Synapse Kusto pool.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByNameAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByObjectAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
KQL script name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: KqlScriptName
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceName
Name of Synapse workspace.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceObject
workspace input object, usually passed through the pipeline.
Parameter properties
Parameter sets
SetByObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
SetByObjectAndKustoPoolDatabase
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs