You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Databricks extension for VSCode allows you to develop for the Databricks Lakehouse platform from VSCode.
9
9
10
10
The extension is available from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/itemdetails?itemName=databricks.databricks-vscode).
11
11
12
-
This is an open source project because we want you to be involved. We love issues, feature requests, code reviews, pull
13
-
requests or any positive contribution. See [CONTRIBUTING.md](CONTRIBUTING.md).
12
+
This is an open source project because we want you to be involved. We love issues, feature requests, code reviews, pull requests or any positive contribution. See [CONTRIBUTING.md](CONTRIBUTING.md).
14
13
15
14
## Features
16
15
17
-
<mark>TODO</mark>
16
+
- Synchronize code to a Databricks workspace
17
+
- Run Python files on a Databricks cluster
18
+
- Run notebooks and Python files as Workflows
18
19
19
-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
20
-
21
-
For example if there is an image subfolder under your extension project workspace:
22
-
23
-
\!\[feature X\]\(images/feature-x.png\)
24
-
25
-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
20
+

26
21
27
22
## Requirements
28
23
29
-
<mark>TODO</mark>
30
-
31
-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
32
-
33
-
## Extension Settings
34
-
35
-
<mark>TODO</mark>
36
-
37
-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
24
+
In order to use this extension you need acceess to a Databricks workspace:
38
25
39
-
For example:
26
+
1. Databricks workspace with:
27
+
1.`Repos` enabled
28
+
2.`Files in Repos` enabled
29
+
2. Permission to access the workspace using a personal access token (PAT)
30
+
3. Access to an interactive cluster or permissions to create a cluster
31
+
4. Permissions to create Databricks repos
40
32
41
-
This extension contributes the following settings:
33
+
## Documentation
42
34
43
-
-`myExtension.enable`: enable/disable this extension
44
-
-`myExtension.thing`: set to `blah` to do something
45
-
46
-
## Known Issues
47
-
48
-
<mark>TODO</mark>
49
-
50
-
Calling out known issues can help limit users opening duplicate issues against your extension.
35
+
- The [Quick Start Guide](README.quickstart.md) provides an overview
1. Open the Databricks panel by clicking on the Databricks icon on the left
18
29
2. Click the "Configure Databricks" button
@@ -26,30 +37,61 @@ The Databricks extension for VSCode allows you to develop for the Databricks Lak
26
37
27
38

28
39
29
-
## Running Code
40
+
## <aid="running-code"></a>Running Code
30
41
31
42
Once you have your project configured you can sync your local code to the repo and run it on a cluster. You can use the https://github.com/databricks/ide-best-practices repository as an example.
3. Click the "Run" icon in the tab bar and select "Run File on Databricks"
38
49
39
50
This will start the code synchronization and run the active python file on the configured cluster. The result is printed in the "debug" output panel.
40
51
41
-

52
+

42
53
43
-
### Running PySpark and notebooks as a Workflow
54
+
### <aid="running-code-as-workflows"></a>Running PySpark and notebooks as a Workflow
44
55
45
56
1. Create a python file or a python based notebook
46
57
1. You can create a python based notebook by exporting a notebook from the Databricks web application or use a notebook that is already tracked in git, such as https://github.com/databricks/notebook-best-practices
47
58
2. Click the "Run" icon in the tab bar and select "Run File as Workflow on Databricks"
48
59
49
60
This will run the file using the Jobs API on the configured cluster and render the result in a WebView.
50
61
51
-
### Advanced: Running using custom run configurations
62
+
### <aid="run-configurations"></a>Advanced: Running using custom run configurations
52
63
53
64
Both ways of running code on a cluster are also available in custom run configurations. In the "Run and Debug" panel you can click "Add configuration..." and select either "Databricks: Launch" or "Databricks: Launch as Workflow". Using run configuration you can also pass in command line arguments and run your code by simply pressing `F5`.
54
65
55
66

67
+
68
+
## <aid="settings"></a>Extension Settings
69
+
70
+
This extension contributes the following settings:
71
+
72
+
-`databricks.logs.maxFieldLength`: The maximum length of each field displayed in logs outputs panel
73
+
-`databricks.logs.truncationDepth`: The max depth of logs to show without truncation
74
+
-`databricks.logs.maxArrayLength`: The maximum number of items to show for array fields
75
+
-`databricks.logs.enabled`: Enable/disable logging. Reload window for changes to take effect
76
+
77
+
## <aid="commands"></a>`Databricks:` Commands
78
+
79
+
The Databricks extension provides commands (prefixed with `Databricks:`) to the VS Code _command
80
+
palette_, available by selecting _View > Command Palette_ or by typing
|`Databricks: Configure sync destination`| Configure target directory for synchronizing code to the configured Databricks workspace |
90
+
|`Databricks: Detach sync destination`| Detach the configured sync destination |
91
+
|`Databricks: Start synchronization`| Start synchronizing local code to the Databricks workspace. This command performs an incremental sync. |
92
+
|`Databricks: Start synchronization (full sync)`| Start synchronizing local code to the Databricks workspace. This command performs full sync even if an incremental sync is possible. |
0 commit comments