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 run Python and R scripts. The connections you create will persist on a single workbook page. A connection must 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 in an individual workbook. In Insights in ArcGIS Enterprise, connections can be created on the home page or in a workbook and used across individual workbooks.

Insights desktop

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

  1. Open a workbook, and select the data you want to add to the 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 appears.

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

After the 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 in a workbook.

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

  1. On 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. Provide a name for 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 is automatically populated when a valid URL is provided.

  5. Click Save.

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

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

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

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

  2. Click the Add new tab.
  3. Provide a name for 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 is automatically populated when a valid URL is provided.

  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

To edit an existing 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 later, 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.