Settings for the Databricks extension for Visual Studio Code
This article lists extension settings for the Databricks extension for Visual Studio Code. See What is the Databricks extension for Visual Studio Code?
Settings reference
The Databricks extension for Visual Studio Code adds the following settings to Visual Studio Code. Open the Settings editor using the Visual Studio Code Command Palette command Preferences: Open Settings. The settings.json file can also be modified directly.
Settings editor (Extensions > Databricks) | settings.json |
Description |
---|---|---|
Bundles: Remove State Refresh Interval | databricks.bundle.remoteStateRefreshInterval |
The interval in minutes at which the remote state of the bundle is refreshed. |
Clusters: Only Show Accessible Clusters | databricks.clusters.onlyShowAccessibleClusters |
Checked or set to true to enable filtering for only those clusters that you can run code on.The default is unchecked or false (do not enable filtering for those clusters). |
Experiments: Opt Into | databricks.experiments.optInto |
Enables or disables experimental features for the extension. Available features include: * views.cluster : Shows or hides the Clusters view. See Select a cluster for running code and jobs. |
Logs: Enabled | databricks.logs.enabled |
Checked or set to true (default) to enable logging. Reload your window for any change to take effect. |
Logs: Max Array Length | databricks.logs.maxArrayLength |
The maximum number of items to show for array fields. The default is 2 . |
Logs: Max Field Length | databricks.logs.maxFieldLength |
The maximum length of each field displayed in the logs output panel. The default is 40 . |
Logs: Truncation Depth | databricks.logs.truncationDepth |
The maximum depth of logs to show without truncation. The default is 2 . |
Override Databricks Config File | databricks.overrideDatabricksConfigFile |
An alternate location for the .databrickscfg file that the extension uses for authentication. |
Python: Env File | databricks.python.envFile |
The absolute path to your custom Python environment variable definitions (.env ) file. See Environment variable definitions files. |
Wsfs: Rearrange Cells | databricks.wsfs.rearrangeCells |
Enable or disable rearranging cells in wrapper files created when using workspace as the sync destination. Databricks recommends keeping this setting enabled. If it is disabled, you will need to manually handle the sys.path for local imports in your notebooks. |
Environment variable definitions files
Visual Studio Code supports environment variable definitions files for Python projects. You create a file with the extension .env
somewhere on your development machine, and Visual Studio Code applies the environment variables within this .env
file at run time. For more information, see Environment variable definitions file in the Visual Studio Code documentation.
To have the Databricks extension for Visual Studio Code use your .env
file, set databricks.python.envFile
within your settings.json file or Extensions > Databricks > Python: Env File within the Settings editor to the absolute path of your .env
file.
Important
If you set settings.json
, do not set python.envFile
to the absolute path of your .env
file as described in the Visual Studio Code documentation, as the Databricks extension for Visual Studio Code must override python.envFile
for its internal use. Be sure to only set databricks.python.envFile
instead.