Today, we are excited to announce the general availability of files throughout the Databricks workspace. Files support allows Databricks users to store Python source code, small sample data, or any other type of file content directly alongside their notebooks. Databricks is also making generally available a new rich file editor that supports inline code execution. The new editor brings many Notebook features to the file editor: autocomplete-as-you-type, object inspection, code folding, and more, offering a more powerful editing experience.
Files support in the Workspace extends capabilities users will be familiar with from Databricks Repos, making those available throughout the entire platform, whether or not users are working with version control systems.
Workspace files expands the surface area in which you can apply software development best practices, such as modular code, unit testing, library and artifact reuse, and specifying software dependencies as code. Historically, Databricks Workspaces only supported notebooks and folders containing notebooks, but now you can create and store files that are less than 200MB in the Workspace. These could include source code and associated requirements (e.g., Python scripts, modules, requirements.txt, or .whl files), small sample data (e.g., .csv files), and more.
Benefits of using workspace files include:
Secure access to individual files or folders using that object's Access Control Lists (ACLs). You can restrict access to individual files or folders to only the users or groups of users that should have access. ACLs can be controlled directly from the Workspace browser or inside the object.
The updated file editor unifies the authoring experiences for files and notebooks by replacing the previous file editing experience with the same one used in the Notebook. You now have a single experience whether working in notebooks or files.
The new editor offers improved programming ergonomics including:
We will also shortly release a bottom-docked output window for the File Editor, so you don't need to scroll to see your execution outputs. Keep an eye on our release notes for updates when it releases.
You can now use and reference any file type in the Workspace without any additional setup or the introduction of source control. Simply upload a file (<200MB) and reference it in your code. Workspace files are enabled by default for Databricks Runtime 11.2 and above, and support for cluster-scoped init scripts is enabled on all current Databricks Runtimes. Learn more in our developer documentation.