Connect to a kernel gateway

Note:

The Insights scripting environment is available in Insights in ArcGIS Enterprise and Insights desktop. The primary connection must be an Insights in ArcGIS Enterprise account to use the scripting environment in Insights desktop.

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 and Insights in ArcGIS Enterprise deployments using ArcGIS Enterprise 10.7.1 or earlier, the connection is created and saved inside an individual workbook. In Insights in ArcGIS Enterprise deployments using ArcGIS Enterprise 10.8, connections can be created on the home page or within a workbook and used across individual workbooks.

Insights desktop or ArcGIS Enterprise 10.7.1

Use the following steps to create a new connection to a kernel gateway in Insights desktop or an Insights in ArcGIS Enterprise deployment built on ArcGIS Enterprise 10.7.1:

  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.

ArcGIS Enterprise 10.8

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

Use 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.

Use 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, 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.