Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The C3 AI Suite provides researchers many tools to analyze data and build and deploy machine learning models. To get started using the C3 AI Suite, please follow the C3.ai DTI Quickstart guide. This guide explains how to connect to a C3.ai cluster, access data using C3.ai methods, and convert C3.ai method outputs to an easy-to-analyze form. Additionally, the guide also provides more detailed instructions to DTI members using the Covid-19 DataLake. Examples in this guide work using the base Datalake available in the git repository: https://github.com/c3aidti/dtiTraining

...

  • Data Integration (Not yet available)
  • Metrics (Not yet available)
  • Machine Learning (Not yet available)

Provision a C3 Package

Provision your C3 package to your C3 cluster/tenant/tag following the instructions available at the DTI Provisioning Guide. DTI members wishing to execute the examples in this guide should provision the 'baseCovidDataLake' following the directions under the heading 'COVID-19 DataLake Provisioning'.

Connect to a C3.ai cluster

Terminology

To best understand the C3 AI Suite and this guide, we're going to introduce some terminology used throughout the suite.

  • Type: Everything within the C3 AI Suite is stored and accessed through Types. These are objects akin to a Java class which contain 'fields' and 'methods'. Some are persisted to internal databases, and others are not. Nearly every aspect of the C3 AI Suite is accessed through Types.
  • Field: A field of a C3 Type. This contains data associated with the Type.
  • Method: A method defined on a C3 Type.
  • Vanity Url: The URL at which a specific tenant/tag of a C3 Cluster can be accessed. The C3 Cluster itself has a URL as well, however most interaction with the C3 AI Suite is done through the vanity url.
  • Tenant: A logical partition of a C3 Cluster. While internally, some data between Tenants may be stored on the same database, this access is not extended to Users of the C3 AI Suite. Users on one tenant can't see data stored on another Tenant.
  • Tag: A slot on which a C3 package is run. Tags sit within a Tenant.
  • Package: The code which the C3 AI Suite runs on a Tag. This is what the developer edits.
  • Provisioning: The loading a Package onto a C3 Tenant/Tag.
  • Static Console: The main method C3 developers use to interact with their C3 Tag. You can access the static console at the url 'https://<vanity_url>/static/console' (Replace <vanity_url> with your vanity url.)
  • Metric: A data analysis object which turns timeseries-like data into a timeseries.

Provision a C3 Package

Provision your C3 package to your C3 cluster/tenant/tag following the instructions available at the DTI Provisioning Guide. DTI members wishing to execute the examples in this guide should provision the 'baseCovidDataLake' following the directions under the heading 'COVID-19 DataLake Provisioning'.

Connecting to a C3.ai cluster

The static console is the main location from which C3 developers typically configure and interact with the C3 AI Suite. We anticipate however, that most DTI researchers will use Python for data analysis. That said, the static console is an essential component of working with the C3 AI Suite, and you will use it frequently. For example, the static console is the best place to find documentation tailored directly to your C3 Package. Its also a great place to quickly test some queries since no specialized environments need to be set up to use it. It's ready to go in your browser.

Accessing the Static Console

Once your C3 package has been provisioned to your Tenant/Tag, Navigate to the static console page. This is at 'https://<vanity_url>/static/console' (Replace <vanity_url> with your vanity url., e.g., https://dti-mkrafczyk.c3dti.ai/static/console). The static console page looks like this:

Image Added

The 'Tools' menu in the upper left hand corner contains a menu to access some available tools. Most relevant is the Provisioner, though there are also utilities for loading JavaScript files, debugging JS code, and inspecting Errors.

Image Added

The 'Help' menu in the upper left hand corner contains a quick menu to access console documentation and a C3 Cluster hosted documentation portal.

Image Added

Additionally, most tools are also accessible in the upper right hand corner with a series of Icons:

Image Added

Using the Static Console

Once you're at the static console, the primary method of interaction is through the JavaScript console of your browser. When the static console page loads (or when you run the c3ImportAll() command), JavaScript methods associated with all of your Package's defined Types are populated. This allows you to run JavaScript code right in the console to interact with your C3 Package.

Most browsers use the keyboard shortcut 'Ctrl+Shift+I' to open the JavaScript console. It is also usually available through the browser's developer tools. If the 'Ctrl+Shift+I' keyboard shortcut doesn't work for you, look at your browsers documentation for the developer tools. With the JavaScript console open, the static console looks like this on the Firefox browser:

Image Added

Finally, we can enter some JavaScript code to see the console in action!

Image Added

Console Commands

We review here several highly used JavaScript console commands which are available on the static console page.

  • c3ImportAll: A console command which loads the API of the current C3 Package. This is necessary after provisioning a new Pacakge if you haven't refreshed your static console page.
  • c3Grid: A console command to display a table of data contained within a C3 Type. (e.g., data returned from a fetch operation, or an evaluate operation among many others).
  • c3Viz: A console command which can produce quick visualizations of some C3 Types. (e.g., timeseries data like EvalMetricsResult)
  • c3ShowType: A console command which produces documentation about a given type. (e.g., c3ShowType(OutbreakLocation))

Official C3.ai Documentation For The Static Console

Using Python with the C3 AI Suite

We anticipate most DTI researchers will want to use Python for data analysis. There are two There are several options to connect to a C3.ai Cluster :

...

via Python. Please follow the links below for detailed information about each.

Fetching Instances of Types

...