Skip to main content

Create a Databricks View

Create a View within Databricks.

Category: Other

How it works

Run Databricks Notebook '<<NotebookPath>>' to generate the script for CREATE VIEW.

To use this activity within the API, use an ActivityCode of CREATE-VIEW.

Example JSON

An example of what the Task Config would look like for a task using this activity. Some of these variables would be set at the group level to avoid duplication between tasks.

{
"NotebookPath": "/Users/fred.nurks@example.com/MyRepo/My Notebook",
"ViewSchema": "",
"ViewName": "",
"NotebookParameters": { "Param1": "Value1", "Param2": "Value2" }
}

Variable Reference

The following variables are supported:

  • AdditionalNotebooks (Optional) - The path to other notebooks, Python files etc., referenced by the main notebook.

  • DatabricksClusterId (Optional) - The Databricks Cluster to use for this task.

  • MaximumNumberOfAttemptsAllowed (Optional) - The total number of times the running of this Task can be attempted.

  • MinutesToWaitBeforeNextAttempt (Optional) - If a Task run fails, the number of minutes to wait before re-attempting the Task.

  • NotebookParameters (Optional) - Parameters for use in the Databricks Notebook. This is JSON format e.g. { "Param1": "Value1", "Param2": "Value2" }.

  • NotebookPath (Required) - The relative path to the Databricks Notebook.

  • ProviderCatalog (Optional) - Only for cross-catalog views. If this view is accessing data in another catalog (the provider catalog), provide the name of the provider catalog here. This is a configuration item which you must specify in Configuration first - it will generally have a different value in each environment.

  • ViewName (Required) - The name of the view.

  • ViewSchema (Required) - The schema that this view resides in.