Part of Using RStudio in the NHS England Secure Data Environment
RStudio Server
Within the SDE, RStudio Server runs on a dedicated Databricks cluster that looks and feels much like the desktop version of RStudio. It has the same layout and features as RStudio, but runs on a server instead.
You can access RStudio Server by logging into Databricks, which is accessed by double-clicking the Databricks icon on the desktop.
Once logged in, you can access RStudio by completing the following steps:
1. Click on Compute in the left-hand menu pane to access all the Databricks compute clusters that are available to you.
2. Select the RStudio Server dedicated compute resource. This resource will normally have 'RStudio Server' within its name.
3. Within the compute resource menu, select the Apps tab and then click the Set up RStudio button.
4. Once clicked, you will see a username and password. These can be used to log into RStudio Server by selecting the Open RStudio link:
5. You will be directed to the RStudio Server login screen. Here you will be to enter your username and the password from the previous step to log in.
ODBC configuration
In RStudio Server, you do not need to configure the ODBC driver as this will have already been pre-configured for you. It will have the following name: Databricks ODBC.
Connecting to Databricks
To connect to Databricks from RStudio Server:
1. Click New Connection from the Connection pane in RStudio.
2. Select the pre-configured Databricks connection (Databricks ODBC).
3. Select New R Script from the Connect from drop-down.
4. Run the connection code and enter your Databricks personal access token when prompted.
The Databricks connection will be established.
5. Select the Connections tab to see the databases available in Databricks.
Working with files and data
Any files stored within your Home folder on RStudio Server will NOT persist in the unlikely event that the RStudio server cluster is terminated or restarted.
Therefore, it is advised that you store any files you are working on within the collab folder, which is a persistent storage location.
Last edited: 12 February 2025 1:08 pm