Count docs

Dynamic query compilation engine

Literally magic.
Count features a unique dynamic query compilation engine that enables unmatched flexibility in how you write and interact with SQL and no-code cells in the canvas. It is designed to harness the speed of modern cloud data warehouses while minimizing data movement and keeping your data secure.

How does the dynamic query compilation engine work?

At query runtime, Count dynamically compiles the SQL for each cell and sends it to the database, then renders the result. When two or more cells are joined together in the DAG, Count will include all SQL necessary to render each cell - including the SQL from any ancestor cells. For example:
  • Cells A and B are SQL cells joined together in the DAG. Cell B queries cell A as its data source.
  • At runtime, Count sends the SQL for cell A to the database and renders results.
  • At runtime, Count sends the SQL for cell B, which includes the SQL from cell A, to the database and renders results
In this example, there were two queries sent to the database; cell A, which includes just its own SQL, and cell B, which includes its own SQL plus the SQL from cell A.
Remember, each cell is a compilation of CTEs - you can see the compiled SQL at any time via the right-click menu, and export your SQL to your database.

What are the benefits of dynamic query compilation?

By compiling SQL dynamically at runtime and relying on your underlying database for computation, Count enables the following:
  • Reusability: Any cell of any type can be queried by any other.
  • Reactivity: Changes at any point in the DAG are compiled and queried at runtime, allowing you to always work with up-to-date data.
  • Auto-lineage: Count automatically links all your cells together into a DAG
  • No data movement: Your data stays in your database where it belongs
  • Improved performance: Count takes advantage of the capabilities of your cloud data warehouse for scalability and query speed.
  • Write in native SQL: Whatever your database, you can use your native SQL syntax to work in Count rather than learning a tool specific query language.