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:
- 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.
- Click the Scripting button on the workbook toolbar.
If you have no existing connections, the New Jupyter Kernel Gateway connection window appears.
- Provide the URL and web socket addresses for the Jupyter Kernel Gateway in the text boxes.
- 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:
- On the home page, click the Connections tab .
- Click New connection.
A menu displays the types of connections that can be created.
- Choose Kernel Gateway as the connection type.
The Kernel Gateway connection window appears.
- 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.
- 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:
- Click the Scripting button on the workbook toolbar.
The Kernel Gateway connection window appears on the Select a Kernel Gateway tab.
- Click the Add new tab.
- 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.
- 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 to open the Jupyter Kernel Gateway window. You can connect to a different gateway using the Switch Connections button .
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.