In This Topic

Simple Operations

In This Topic

In Simple operation transformation, the DataEngine employs simple operations such as addition, subtraction, multiplication, division etc. Simple operations do not involve any grouping or aggregation.

Simple operations can be categorized into two types:

**Unary Operations**: Unary operation is an operation which requires only one operand to perform the operation.**DataEngine**supports the following unary operations: Dt, Dtpart, Fmt, Rnd, Rpl, SubStr, LCase and UCase**.**

**Binary Operations**: Binary operation is an operation which requires two operands to perform the operation. DataEngine supports the following binary operations: Add, Sub, Div, Mod and Mul.

This section describes how a user can formulate a DataEngine query to perform simple operations on base tables. The afore-mentioned simple operations are methods in the Op class of the **C1.DataEngine** assembly, which are invoked while defining the query used to perform a simple operation.

Consider an example where the user has imported the data from the “**Invoices**” database table to the **DataEngine** base table named “Invoices” (Refer Connect DataEngine to Database topic for more details). Using this data you can calculate the total payable amount corresponding to each order. This can be calculated by summing the extended price and the freight cost values present in the ‘**ExtendedPrice**’ and ‘**Freight**’ columns of the Invoices table.

To implement this operation, you need to define the following query using the Add method of the **Op** class, which would perform the **Add binary** operation: