Databricks SDK for JavaScript
    Preparing search index...
    interface NotebookTask {
        baseParameters?: Record<string, string>;
        notebookPath?: string;
        source?: Source;
        warehouseId?: string;
    }
    Index

    Properties

    baseParameters?: Record<string, string>

    Base parameters to be used for each run of this job. If the run is initiated by a call to :method:jobs/run Now with parameters specified, the two parameters maps are merged. If the same key is specified in base_parameters and in run-now, the value from run-now is used. Use Task parameter variables to set parameters containing information about job runs.

    If the notebook takes a parameter that is not specified in the job’s base_parameters or the run-now override parameters, the default value from the notebook is used.

    Retrieve these parameters in a notebook using dbutils.widgets.get.

    The JSON representation of this field cannot exceed 1MB.

    notebookPath?: string

    The path of the notebook to be run in the workspace or remote repository. For notebooks stored in the workspace, the path must be absolute and begin with a slash. For notebooks stored in a remote repository, the path must be relative. This field is required.

    source?: Source

    Optional location type of the notebook. When set to WORKSPACE, the notebook will be retrieved from the local workspace. When set to GIT, the notebook will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise.

    • WORKSPACE: Notebook is located in workspace.
    • GIT: Notebook is located in cloud Git provider.
    warehouseId?: string

    Optional warehouse_id to run the notebook on a SQL warehouse. Classic SQL warehouses are NOT supported, please use serverless or pro SQL warehouses.

    Note that SQL warehouses only support SQL cells; if the notebook contains non-SQL cells, the run will fail.