This first step is needed to give you the conda
command. For example, on Ubuntu Linux:
|
Use conda
to create a python environment containing all needed python modules along with Jupyter Notebook (if needed). For example:
|
This module contains the get_c3
function which will be used to connect to C3 AI Suite. For example:
|
|
To start Jupyter and connect via browser, or launch your python session:
|
If the launch did not automatically open Jupyter in your browser window, note any URL and/or Token printed in your shell output and open Jupyter in your browser: http://localhost:8080/jupyter
Note: You will only be able to access notebooks in the current shell directory and below, so cd
to an appropriate top-level directory before launching.
In Jupyter navigate to a .ipynb
notebook you wish to open. Once open, change the kernel to the name of your conda environment. For example: py-pythonEnv_venv
.
Note: Once changed it should show in the upper right as the active kernel.
To import the c3
object with the get_c3
helper function, add the following code in your Jupyter notebook:
|
For example, assuming you are running the docker container on your local machine, you would have the following for a "test/c4" tenant and tag:
|
Note: The above loads the 'thick' connector, which is now the officially supported version. You can load the thin connector by replacing thick
with thin
in the get_c3
function call.
If successful the above code should prompt you for a username and password when run in the Jupyter cell:
The username and password are the BA / BA used to access the C3 AI static console.