編集

次の方法で共有


New-AzSynapseKqlScript

Creates or updates a KQL script in a workspace.

Syntax

New-AzSynapseKqlScript
   -WorkspaceName <String>
   [-Name <String>]
   -DefinitionFile <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSynapseKqlScript
   -WorkspaceName <String>
   [-Name <String>]
   -KustoPoolName <String>
   -KustoPoolDatabaseName <String>
   -DefinitionFile <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSynapseKqlScript
   -WorkspaceObject <PSSynapseWorkspace>
   [-Name <String>]
   -DefinitionFile <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSynapseKqlScript
   -WorkspaceObject <PSSynapseWorkspace>
   [-Name <String>]
   -KustoPoolName <String>
   -KustoPoolDatabaseName <String>
   -DefinitionFile <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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefinitionFile

The KQL file path.

Type:String
Aliases:File
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-KustoPoolDatabaseName

Name of Synapse Kusto database.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-KustoPoolName

Name of Synapse Kusto pool.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

KQL script name.

Type:String
Aliases:KqlScriptName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceName

Name of Synapse workspace.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceObject

workspace input object, usually passed through the pipeline.

Type:PSSynapseWorkspace
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSSynapseWorkspace

Outputs

PSKqlScriptResource