All posts

Changelog #3: Introducing data apps

3 minsMar 29, 2024authorLucas da Costa

Besides the usual bug fixes, we're shipping a major new feature this week: data apps.

You can now add inputs and select fields to your documents, and allow viewers to provide input to your Python code or SQL queries.

Please notice data apps are only available for users in the professional tier.

When to use data apps features

You should use data apps features whenever you want viewers to be able to provide input to your reports, models, or analyses.

In a nutshell, data apps are interactive documents that allow viewers provide input to the code you've written.

Typical examples include:

  • Comparing scenarios: Allow viewers to change assumptions and see how the results change.
  • Exploring data: Allow viewers to change the data they're looking at.
  • Filtering data: Allow viewers to filter data by date, region, or any other dimension.

How data apps work

To create a data app, you must first add an input or select field to your document by using the /input or /select commands.

For each of those blocks, you can specify a label. The variable name is the one you see on the top right corner of the block in a green box.

Then, you can reference the variable name in your Python code in the same way you would reference a variable you created yourself.

To interpolate the value of the input or select field in SQL blocks, use the {{variable_name}} syntax.

Please notice that you can now interpolate any variables in your SQL blocks, not only the ones created by input or select fields.

Finally, use the "Make it a data app" toggle on the top right corner of your document, under the share menu, to enable the data app mode.

Toggling the data app mode allows viewers to provide input to your document, but they still can't edit the document's content.

Other fixes and improvements

  • We fixed a bug where users would not be automatically logged out once their session expired. Now, users will be imediatelly logged out and redirected to the login page when their session expires.
  • Document snapshots: we now keep snapshots for users in the professional tier. These snapshots are taken every five minutes and will be available for the last 5 days. The last 10 snapshots are always available, regardless of how old they are.
  • We've done updates to the visualizations so they support data types they used to not support.