Count docs
Search…
⌃K
Links

Overview

Cells are the building blocks of life and also your canvas.

What are cells?

Cells are how you query data in Count. While there are many types that look and function differently, under the hood every cell is a SQL select statement that returns a table.

Types of cells

Depending on how you want to build your query, you can choose one of the following cell types:
  • SQL - type SQL directly into the cell, using the syntax for your database.
  • Visual- build pivot tables or charts without code by selecting columns from your database or other cells.
  • Control - provide input parameters for other cells via a widget. In other words, multi-select or calendar filters for example.
  • CSV - import CSV data into the canvas to use as a data source for other cells.
A control cell, SQL cell and visual cell linked together in the canvas.

Where do cells get data?

Understanding how cells interact with your database and other cells is critical to getting the most out of Count. Any cell in Count can pull data from either your underlying database, or from another cell.
The implications of this are really quite powerful. For example, you could build a visualization directly against your database, then write SQL against your visualization. Any cell can be the starting point for a new analysis.

How do cells work?

Each cell is a query

Each cell is a query that is sent to your database. Count's dynamic query compilation engine compiles SQL at runtime to provide reactivity, lineage and auto-DAG.

Cells reference and build upon one another

Because cells can reference a database or another cell, they can be chained together into a linear or branching analysis. This allows you to break complex problems into easier to solve chunks. Count automatically connects related cells to one another to make data flows easy to follow.

Cells are reactive

Any change in a chain of cells will automatically flow through to all downstream cells. This makes updating your analysis a seamless process.

Cells are CTEs

Under the hood, each cell is a common table expression (CTE). You can view this SQL at any time by right clicking the cell and choosing 'Copy compiled SQL.' Because Count uses the syntax of your underlying database, you can port this SQL out of Count and into your database or dbt at any time.
Under the hood, each cell is an independent SQL query.
Count's dynamic query compilation engine makes all this goodness possible. Check it out in my detail here.

Working with cells

Creating cells

There are four ways to create cells in the canvas:
  • Via the control bar at the bottom of the canvas, or via keyboard shortcuts. You can see a list of shortcuts and controls here.
  • Via the buttons that appear when you hover over the edge of any existing cell. This will create a new visual or SQL cell that is pre-filtered to reference your starting cell.
  • Dragging a table from the data bar into the canvas to create a SQL cell.
  • Dragging a column from the data bar into the canvas to create a visual cell.

Naming cells

When you create a cell it will be given a letter as a default name. We strongly advise you to rename the cell to help remind yourself, and others, what each cell represents. This is the name you will use to reference the cell in any SQL you write.

Cell hover menu

The cell hover menu contains options for viewing, formatting and exporting data from your cell. Click on a cell to select it and see the hover menu.
Cell control menu available on hover.

Cell context menu

The cell context menu contains options for layering, locking, formatting and copying SQL from cells. Right-click anywhere on the cell to open it.
The cell context menu.

Deleting cells

To delete a cell, simply select it and hit the backspace key.

Cell types

You can further explore cell types with the links below: