< Back

Start-AzureDatabricksJob

Sun Jan 19, 2020 6:07 pm

NAME Start-AzureDatabricksJob



SYNOPSIS

Starts an Azure Databricks Job by Job ID





SYNTAX

Start-AzureDatabricksJob [-Connection] <Object> [-JobID] <Int32> [[-Parameters] <Hashtable>] [-RunAsync]

[<CommonParameters>]





DESCRIPTION

Starts a predfined job on an Azure Databricks instance. This function will wait for the job complete by default.

If you want

the function to NOT wait for the job to finish, include the -RunAsync switch parameter.





PARAMETERS

-Connection <Object>

An object that represents an Azure Databricks API connection where you want to remove your job from



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-JobID <Int32>

The Job ID of the job you want to start.



Required? true

Position? 2

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Parameters <Hashtable>

Any dynamic parameters you want to pass the notebook defined in your job step. Should be passed in as a

hashtable (see notes)



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RunAsync [<SwitchParameter>]

A flag to indicate if the function should wait for the job to stop or not. True will run the job without

waiting for a result.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





A sample of the hashtables needed for this function:



$Parameters = @{

'ParameterName' = 'value1'

'ParameterName2' = 2

}



Each line of your hashtable should a key/value pair of the name of the paramter in your notebook-based job and

the value(s) you want to pass in.



Author: Drew Furgiuele (@pittfurg), http://www.port1433.com

Website: https://www.igs.com

Copyright: (c) 2019 by IGS, licensed under MIT

License: MIT https://opensource.org/licenses/MIT



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Start-AzureDatabricksJob -Connection $Connection -JobID 1



Starts job id 1 on the Azure Databricks instance defined in $Connection



PS C:\\> Start-AzureDatabricksJob -Connection $Connection -JobID 1 -RunAsync

Starts job id 1 on the Azure Databricks instance defined in $Connection without waiting for the job to complete.



PS C:\\> Start-AzureDatabricksJob -Connection $Connection -JobID 1 -Parameters $Params

Starts job id 1 on the Azure Databricks instance defined in $Connection while also passing in the paramters

defined in the hashtable $Params

for the notebook referenced in the job











RELATED LINKS