FabricTools v0.33.0 Public Preview

New-FabricSparkJobDefinition

Creates a new SparkJobDefinition in a specified Microsoft Fabric workspace.

Syntax

New-FabricSparkJobDefinition [-WorkspaceId] <guid> [-SparkJobDefinitionName] <string>
 [[-SparkJobDefinitionDescription] <string>] [[-SparkJobDefinitionPathDefinition] <string>]
 [[-SparkJobDefinitionPathPlatformDefinition] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

This function sends a POST request to the Microsoft Fabric API to create a new SparkJobDefinition in the specified workspace. It supports optional parameters for SparkJobDefinition description and path definitions.

Examples

Example 1

This example creates a new SparkJobDefinition named "New SparkJobDefinition" in the workspace with ID "workspace-12345" with the provided description.

New-FabricSparkJobDefinition -WorkspaceId "workspace-12345" -SparkJobDefinitionName "New SparkJobDefinition" -SparkJobDefinitionDescription "Description of the new SparkJobDefinition"

Parameters

NameTypeReq.Pos.PipelineDescription
-SparkJobDefinitionName string ✓Required 1 –

The name of the SparkJobDefinition to be created. This parameter is mandatory.

-WorkspaceId guid ✓Required 0 –

The unique identifier of the workspace where the SparkJobDefinition will be created. This parameter is mandatory.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-SparkJobDefinitionDescription string 2 –

An optional description for the SparkJobDefinition.

-SparkJobDefinitionPathDefinition string 3 –

An optional path to the SparkJobDefinition definition file to upload.

-SparkJobDefinitionPathPlatformDefinition string 4 –

An optional path to the platform-specific definition file to upload.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Calls Confirm-TokenState to ensure token validity before making the API request.

Author: Tiago Balabuch, Kamil Nowinski