Comment on page
Cells are the building blocks of life and also your canvas.
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.
Depending on how you want to build your query, you can choose one of the following cell types:
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.
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 - this structure is called the DAG, and is indicated in the canvas with colored arrows between cells.
Any change in a cell will automatically flow through to all downstream cells. This makes updating your analysis a seamless process, and ensures that all cell results are kept in-sync with one another.
Under the hood, each SQL 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.
There are four ways to create cells in the canvas:
- 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-configured to reference your starting cell.
When you create a cell it will be given a default name. We strongly advise you to rename the cell to help remind yourself, and others, of what each cell represents. This is the name you will use to reference the cell in any SQL you write. And don't worry about changing a cell's name later. If you ever change a cell's name, you'll have the option to update the references in all downstream cells.
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.
The cell context menu contains additional cell-specific options for formatting, copying, selecting, and downloading data from cells. Right-click anywhere on the cell to open it.
To delete a cell, simply select it and hit the backspace key.