Skip to main content

How to Import SQL Files

G
Written by Grace Fraser
Updated this week

How to transform complex, nested SQL queries into clear, connected DAGs (Directed Acyclic Graphs) in Count for better understanding and collaboration.

Steps:

  1. Copy Your SQL Query: Select and copy your SQL statement directly from your preferred IDE or editor to your clipboard.

    Note: Count can only process SELECT and WITH statements. CREATE, UPDATE, and DELETE statements will not be executed.
    ​

  2. Paste into a New Cell: In your Count canvas, create a new, blank cell and paste your copied SQL query into it.
    ​

  3. Explode CTEs to Cells: : With the cell containing your SQL query selected, look for the "explode" button (image below). Click this button.

    Count will automatically parse your SQL query and represent each Common Table Expression (CTE) and the final SELECT statement as individual, interconnected cells in a DAG. This visual representation makes it easier to follow the logic of your query, debug individual steps, and communicate the data flow to others.
    ​
    ​

Did this answer your question?