Back to Sigma Computing questions
CodingSoftware Engineer

SigmaTable

Frequency: Reported


Implement SigmaTable, a simplified version of Sigma's core product, using the supplied Column, DataWarehouseTable, and DataWarehouse classes.

Sigma sits on top of cloud data warehouses. A Sigma table may define virtual columns as functions of other columns—for example, [My Sum Col]: [Data 1] + [Data 2]—and summaries such as the minimum or maximum of a column. Sigma stores the operations needed to produce those results and compiles them to SQL against the latest warehouse data; it does not store or alter the customer's data.

Requirements

  • Do not store warehouse data in SigmaTable; the supplied get_data_warehouse method is the only warehouse reference it should retain.
  • Do not store values computed from warehouse data in SigmaTable.
  • Do not add data to the warehouse.
  • Trying to use a missing column must raise ValueError.
  • Treat missing data as 0.
  • SigmaTable may retain operation metadata.
  • Make reasonable choices where the prompt is ambiguous.

The example defines A + B over these columns:

Col ACol BA + B
145
257
369

It also shows summaries Max of Col A = 3 and Min of A + B = 5.

Preserved code

Both submissions are preserved as reported, not presented as verified reference solutions.