Next Webinar →Build a self-serve agent, live | 20 MAY

7. Cell reactivity and Count's local db: Getting Started in Count

Boost efficiency with Count's reactive cells and local db. Instantly update data and speed up queries without overloading your database. Perfect for seamless analysis!

2:17.30000000000001

Transcript

it's important to know that cells are reactive. So any change that is made to a parent cell means that everything downstream will be updated to reflect that. I'm going to go into this cell and just make a minor change to that date, and you will see that that cell and everything downstream of it is updating. It can be useful to understand what's actually happening behind the scenes here as well. Each cell that we have created here is running a different query back to the database. If I were to click on this one and choose copy as SQL, We can see here that there is a DAG, a short one, because there's only one parent cell upstream and this SQL has been compiled on the fly and it contains the logic from this cell and the logic of all cells above it. So this is the query that is run back to the database for this cell, and this is the same for any cell, including our visuals. You may also have noticed that in our data sources menu, we have a local database and this is counts in memory database that you can use while you're working in count. And this can speed up your queries, and it can reduce the overall query load back to your database. So to lean on this, we can simply highlight the cells downstream of our first parent cell. And then under source, we can just change this to local. You might notice that the colors behind the titles have changed and they match up to our data sources. So BigQuery here we can see was green. So this is still a BigQuery cell, but local here is purple, and we can see that these have changed. So the benefit now is that by running this one query against your database, we can then move into our local dot DB database and do as much analysis as we would like without sending additional queries back to your database. I mentioned as well, it makes your queries a lot quicker. So, again, if I come and make a change here like we did before, you'll see that everything downstream changes extremely quickly. Whereas before, when we were running that on our BigQuery database, it was taking a few seconds. So I recommend leaning on a dot DB database where possible.