I am trying to use Visual Studio Code for Spark development.
My PySpark code all runs fine, but there is no code completion/hints.
How can I add these features for VS Code?
I have the Python and Pylance extensions installed.
In PyCharm this all work perfectly as expected.
2
Answers
The solution I found was to use the Jedi language server:-
"python.languageServer": "Jedi"
For Jupyter notebook you also need to set:-
"jupyter.enableExtendedPythonKernelCompletions": true
As mentioned in doc, you need to install and set up the Databricks extension for Visual Studio Code.
To enable IntelliSense (also known as code completion) in the Visual Studio Code code editor for
PySpark
,Databricks Utilities
, and related globals such asspark
anddbutils
, do the following with your code project opened:Configure autocomplete for Databricks globals and press Enter.
Visual Studio Code to install PySpark for your project, and to add
or modify the
__builtins__.pyi
file for your project to enableDatabricks Utilities.