Skip to content
  • There are no suggestions because the search field is empty.

Databricks - Load data - Native Load Control

Applies to
Platform: Databricks

Load the deployed Databricks solution with the native load control: a notebook runs every loader notebook in dependency order, four at a time. Run <project>_MultithreadingLoadExecution once or schedule it as a Databricks job. Afterwards the log table execution_log lists every loader run.

The same steps apply with Unity Catalog and with the Hive metastore. To load with Apache Airflow instead, see Databricks - Load data - Apache Airflow Load Control.

Prerequisites

Load the data

  1. In the workspace folder of the artifacts, open LoadControl/<project>_MultithreadingLoadExecution.
  2. Attach the cluster and choose Run all.
  3. Wait until the notebook ends with all tasks completed successfully. It prints one line per loader when the loader starts and finishes.

The notebook takes its start time as the load timestamp and passes it to every loader, so all rows of a run get the same bg_loadtimestamp. A loader runs after the loaders of its sources. When a loader fails, the notebook skips all loaders that depend on it.

To load on a schedule, create a job in Jobs & Pipelines with a notebook task for this notebook on the cluster, and add a schedule trigger.

Check the result

  1. Open Helpers/<project>_SelectResults and run it. It shows the row count and the latest load timestamp of each result view.
  2. Query the log of the load control, with your catalog and load control schema:
    SELECT log_level, task_name, message
    FROM <catalog>.<load control schema>.execution_log
    WHERE task_name = 'main' OR log_level = 'ERROR'
    ORDER BY log_timestamp;
    A successful load ends with the row main, tasks completed successfully.

With the Hive metastore, name the tables <database>.<table> instead.

Example

A Stage Files project with eight loaders writes its tables to the schema stage of the example catalog dwh. stageparquetdatabricks_SelectResults then shows, shortened and split in two blocks:

|table_name                            |row_count|
|`dwh`.`stage`.`stg_st_branch_result`  |3        |
|`dwh`.`stage`.`stg_st_customer_result`|3        |
|table_name                            |bg_loadtimestamp          |
|`dwh`.`stage`.`stg_st_branch_result`  |2026-11-03 04:09:15.935295|
|`dwh`.`stage`.`stg_st_customer_result`|2026-11-03 04:09:15.935295|

Both result views show the same load timestamp, the start time of the load notebook.

Load part of a project

To load part of a project, generate the artifacts for a Dataflow Modeling View, deploy them and run their load notebook. The artifacts of a view contain only its model objects.

Several views of one project can be loaded in order with one job:

  1. Put each model object in one view only. A model object that depends on another one is in the same view or in a view loaded later. For example, the view Order depends on CreditCard and Customer:
    View flow in which the views CreditCard and Customer both lead to the view Order
  2. Generate and deploy each view into its own workspace folder. Their notebooks have the same names.
  3. Deploy the load control only once, with the first view; for the other views, run .\deploy.ps1 -SkipDeployment and then Jupyter/<project>_Deployment. Each deployment of the load control replaces the log tables execution_log and deployment_log.

    Give each project its own load control schema (placeholder loadcontrol#loadcontrol#schema_name with Unity Catalog, loadcontrol#loadcontrol#database_name with the Hive metastore). With the default Deployment Options, a project that deploys the load control into a shared schema empties the logs of the other projects.

  4. In Jobs & Pipelines, create a job with one notebook task per view. Each task runs the load notebook of its view folder on your cluster:
    Job task form with the fields Task name, Type Notebook, Source Workspace, Path and Compute
  5. In Depends on, select the tasks of the views it depends on, for example Load_View_Creditcard and Load_View_Customer for Load_View_Order:
    Depends on field with the task Load_View_Creditcard selected
  6. Choose Run now. A task starts when the tasks it depends on have succeeded.

Failure symptoms and recovery

The load notebook ends with failed tasks

Message: <number> tasks failed during execution. Please check the logs for more details.
Cause: A loader notebook failed; the notebook skipped the loaders that depend on it.
Fix: Find the loader with task failed in execution_log and open its notebook run in the output. Correct the cause and run the load notebook again.

The load notebook does not find a loader

Message: task could not be found when running command in execution_log
Cause: The loader notebooks are not in the folder of loader_folder_path, ../Jupyter/ by default.
Fix: Upload the whole artifacts folder, or correct loader_folder_path in replacement_config.json, unzip the artifacts again, replace the placeholders and upload them with .\deploy.ps1 -SkipDeployment.

For failures in other steps, see Troubleshoot generation, deployment and load failures.

Release differences

Sequential Notebook

Generator 1.8 offered the LoadControl Options value Sequential Notebook. It generated <project>_SimpleLoadExecution.ipynb, which ran the loaders one after the other from the dependencies file bg_<project>_dependencies.json. Since Generator 1.9 only Multi-Threading Notebook and Airflow are offered.

Related articles