C3 AI Upsert
The C3 AI Upsert node enables a user to load data (create rows) from C3 Ex Machina into the C3 Application data model via a C3 Type.
A C3 Type represents underlying data, including tabular data, timeseries data, or more complex data objects and relationships. The source of all C3 AI platform data access operations are done via C3 Types.
C3 Types provide an abstraction layer for users to use a simple interface to retrieve, update, and persist data without worrying about implementation details like what enterprise system is used--whether it be a SQL database, NoSQL database, or filesystem.
This enables users to retrieve data through simple APIs and consistent interaction patters across all data stores rather than needing to know CQL or SQL and updating logic if underlying data systems change.
Many developers with an object-oriented background might feel comfortable thinking of a C3 Type as similar to a class in Java, which describes data fields, operations and static methods that can be called on the type by one or more applications.
Analysts can also think of a type as a "table" in a more traditional enterprise system.
Prerequisites
The user must be in the appropriate Admin Group and have the correct roles to be authorized to load data to the selected C3 Type. By default, C3 AI follows the principle of least privilege and users may not have been granted access to write data (rows) into C3 Types. Please speak to the C3 AI Support Team to ensure proper setup.
Configuration
| Field | Description |
|---|---|
| Name default=none | A user-specified node name displayed in the canvas |
| C3 AI Type Required | The C3 Object (Type) to insert data into |
| Select the desired type from the C3 AI Application data model. | |
| Mapping Required | The dataset to use for C3 AI Type mapping |
| Mapping a dataset to a C3 Type requires one or more dataset columns be mapped to a C3 Type field. C3 Type fields can be simple data types (string, double, datetime) or reference C3 Types requiring a path (i.e., parent.id, quantity.value). |
Node Inputs/Outputs
| Input | A Visual Notebooks dataframe |
|---|---|
| Output | None. The data is uploaded to the specified C3 Type and may be accessed by data scientists and other teammates by "fetching" |

Figure 1: Example node setup. Note the node must take a dataframe as input. The output will persist the data as rows to a C3 Type.
Examples
The sample data represents telemetry data from a set of turbines. The data appears as follows with the following fields: Timestamp, ActivePower, GeneratorRotationSpeed, GearOilTemperature, and Asset.

Figure 2: Sample data from a CSV to be uploaded to a C3 Type.
Select the C3 Type to write this data to. Each row in the original dataframe becomes an instance of the Type object. This example writes the data to the "TelemetryData" Type in the C3 AI Application data model

Figure 3: Selecting the "TelemetryData" type.
Create a mapping (Column and Field Path) for each dataset column to be mapped to a C3 Type field. Column is the dataset column to be mapped to the C3 AI attribute. Field Path is the attribute or path to the C3 Type field. The Field Path can be a C3 Type field name (i.e., name), or a path (i.e., quantity.value)

Figure 4: Mapping the input data to the type fields.
Select Run to upload the data to the specified "TelemetryData" which can now be fetched by any user