Connect to a kernel gateway

Insights in ArcGIS Enterprise
Insights desktop
Note:

The Insights scripting environment is available in Insights in ArcGIS Enterprise and Insights desktop. The primary connection can be to either Insights in ArcGIS Enterprise or Insights in ArcGIS Online.

Jupyter Kernel Gateway connections can be disabled for an Insights in ArcGIS Enterprise organization during the installation process. Contact your administrator if the Jupyter Kernel Gateway connections are not available. For more information, see Install Insights in ArcGIS Enterprise.

A Jupyter Kernel Gateway connection allows you to access kernels within the Insights scripting environment, where you can create and execute Python and R scripts. The connections you create will persist on a single workbook page. A connection has to be created or applied to each page of a workbook where scripting will be used. Saving the workbook will save the connections on the pages.

You must set up a Jupyter Kernel Gateway before you can create a connection to the gateway.

Create a connection

The method for creating a Jupyter Kernel Gateway connection depends on your Insights deployment. In Insights desktop, the connection is created and saved inside an individual workbook. In Insights in ArcGIS Enterprise, connections can be created on the home page or within a workbook and used across individual workbooks.

Insights desktop

Complete the following steps to create a new connection to a kernel gateway in Insights desktop:

  1. Open a workbook. Select data you want to add to your workbook, if necessary.
    Tip:

    You can also load data from within the scripting environment.

  2. Click the Scripting button Scripting on the workbook toolbar.

    If you have no existing connections, the New Jupyter Kernel Gateway connection window opens.

  3. Enter the URL and web socket addresses for your Jupyter Kernel Gateway in the text boxes.
  4. Click Connect.

After your connection is created, you can use the Select Kernel menu to choose a programming language (Python or R) and start using the scripting environment.

Insights in ArcGIS Enterprise

In Insights in ArcGIS Enterprise, kernel gateway connections can be created on either the home page or within a workbook.

Complete the following steps to create a new kernel gateway connection on the home page:

  1. From the home page, click the Connections tab Connections.
  2. Click New connection.

    A menu displays the types of connections that can be created.

  3. Choose Kernel Gateway as the connection type.

    The Kernel Gateway connection window appears.

  4. Enter the name you want to give the kernel gateway connection (for example, the name of the machine that the connection was created on) and the URL for the kernel gateway. The Web socket field will be automatically populated when a valid URL is entered.
  5. Click Save.

The Jupyter Kernel Gateway connection is added to the Connections page.

Complete the following steps to create a new kernel gateway connection inside a workbook:

  1. Click the Scripting button Scripting on the workbook toolbar.

    The Kernel Gateway connection window opens on the Select a Kernel Gateway tab.

  2. Click the Add new tab.
  3. Enter the name you want to give the kernel gateway connection (for example, the name of the machine that the connection was created on) and the URL for the kernel gateway. The Web socket field will be automatically populated when a valid URL is entered.
  4. Click Connect.

The Insights scripting environment connects to the Jupyter Kernel Gateway. The kernel gateway connection is also added to the Connections tab on the home page.

Edit a connection

If you've already created a connection in your current session, click the Scripting button Scripting to open the Jupyter Kernel Gateway window. You can connect to a different gateway using the Switch Connections button Switch Connections.

If you are using an Insights in ArcGIS Enterprise deployment built on ArcGIS Enterprise 10.8 or higher, you can also edit an existing kernel gateway connection from the Connections tab of the home page by clicking the name of the connection, updating the connection parameters, and clicking Save.